!function(){"use strict";function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),f=Object.defineProperty,d=(t,e,r)=>((t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),v=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(v||{}),p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},g={};function w(t){if(g[t])return g[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in p?p[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in m?m[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return g[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?g[t]=u:r}catch(t){return r}}var y={};function b(t,e,r){var i,n=t+"."+String(r);if(y[n])return y[n].call(e);var s=w(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(y[n]=o,o.call(e)):e[r]}var S={};function k(t,e,r){var i=t+"."+String(r);if(S[i])return S[i].bind(e);var n=w(t)[r];return"function"!=typeof n?e[r]:(S[i]=n,n.bind(e))}var C={childNodes:function(t){return b("Node",t,"childNodes")},parentNode:function(t){return b("Node",t,"parentNode")},parentElement:function(t){return b("Node",t,"parentElement")},textContent:function(t){return b("Node",t,"textContent")},contains:function(t,e){return k("Node",t,"contains")(e)},getRootNode:function(t){return k("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?b("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null},querySelector:function(t,e){return b("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return b("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return w("MutationObserver").constructor},patch:function(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}};function I(t){return t.nodeType===t.ELEMENT_NODE}function M(t){var e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function R(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&(r=t.ownerNode.baseURI);var i=Array.from(e,(t=>_(t,r))).join("");return(n=i).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(t){return null}var n}function _(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=R(t.styleSheet)||function(t){var{cssText:e}=t;if(e.split('"').length<3)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return P(i,t.styleSheet.href)}catch(t){}return i}var n,s=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,s=s.replace(n,"$1\\$2")),e?P(s,e):s}class O{constructor(){d(this,"idNodeMap",new Map),d(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),I(t)){var r=C.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){var r=e.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function T(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&E(n);return(r[i.toLowerCase()]||h&&r[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function E(t){return t.toLowerCase()}var A="__rrweb_original__";function B(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?E(e):null}function L(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var F=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,N=/^(?:[a-z+]+:)?\/\//i,D=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function P(t,e){return(t||"").replace(F,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(N.test(h)||D.test(h))return"url("+u+h+u+")";if(j.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),c=h.split("/");for(var f of(l.pop(),c))"."!==f&&(".."===f?l.pop():l.push(f));return"url("+u+l.join("/")+u+")"}))}var U="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",W=4096;var z,q,H=1,G=new RegExp("[^a-z0-9-_:]"),V=-2;function Y(){return H++}var Z=/^[^ \t\n\r\u000c]+/,J=/^[, \t\n\r\u000c]+/;var X=new WeakMap;function K(t,e){return e&&""!==e.trim()?tt(t,e):e}function Q(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function tt(t,e){var r=X.get(t);if(r||(r=t.createElement("a"),X.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function et(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){var o=K(t,i);if("img"===e&&o.startsWith("data:")&&n){var a=n,h=o;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(h=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>W||t.naturalHeight>W)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(a,o,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(u=h,h=!(l=s.maxBase64ImageLength)||u.length<=l?u:U),h}return o}return"xlink:href"===r&&"#"!==i[0]?K(t,i):"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(i=n[0],r+=i.length,i):""}for(var n=[];i(J),!(r>=e.length);){var s=i(Z);if(","===s.slice(-1))s=K(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=K(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?P(i,tt(t)):"object"===e&&"data"===r?K(t,i):i:K(t,i);var u,l}function rt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function it(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&it(C.parentNode(t),e,r);for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}return!!r&&it(C.parentNode(t),e,r)}function nt(t,e,r,i){var n;if(I(t)){if(n=t,!C.childNodes(n).length)return!1}else{if(null===C.parentElement(t))return!1;n=C.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(it(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function st(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1}=e,g=function(t,e){if(!e.hasNode(t))return;var r=e.getId(t);return 1===r?void 0:r}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:v.Document,childNodes:[],compatMode:t.compatMode}:{type:v.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:g};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,{doc:s,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:u={},maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:g}=e,w=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}if(r)return t.matches(r)}catch(t){}return!1}(t,o,a),y=function(t){if(t instanceof HTMLFormElement)return"form";var e=E(t.tagName);return G.test(e)?"div":e}(t),b={},S=t.attributes.length,k=0;k0!==t)))return!1}return!0})(t)||(b.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){var N=t.toDataURL(c.type,c.quality),D=s.createElement("canvas");D.width=t.width,D.height=t.height,N!==D.toDataURL(c.type,c.quality)&&(b.rr_dataURL=N)}if("img"===y&&f){z||(z=s.createElement("canvas"),q=z.getContext("2d"));var j=t,P=j.currentSrc||j.getAttribute("src")||"",U=j.crossOrigin,W=()=>{j.removeEventListener("load",W);try{z.width=j.naturalWidth,z.height=j.naturalHeight,q.drawImage(j,0,0),b.rr_dataURL=z.toDataURL(c.type,c.quality)}catch(t){if("anonymous"!==j.crossOrigin)return j.crossOrigin="anonymous",void(j.complete&&0!==j.naturalWidth?W():j.addEventListener("load",W));console.warn("Cannot inline img src="+P+"! Error: "+t)}"anonymous"===j.crossOrigin&&(U?b.crossOrigin=U:j.removeAttribute("crossorigin"))};j.complete&&0!==j.naturalWidth?W():j.addEventListener("load",W)}if("audio"===y||"video"===y){var H=b;H.rr_mediaState=t.paused?"paused":"played",H.rr_mediaCurrentTime=t.currentTime,H.rr_mediaPlaybackRate=t.playbackRate,H.rr_mediaMuted=t.muted,H.rr_mediaLoop=t.loop,H.rr_mediaVolume=t.volume}m||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop));if(w){var{width:V,height:Y,left:Z,top:J}=t.getBoundingClientRect();b={class:b.class,rr_width:V+"px",rr_height:Y+"px",rr_left:Math.floor(Z+((null==(r=s.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(J+((null==(i=s.defaultView)?void 0:i.scrollY)||0))+"px"}}"iframe"!==y||p(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(t){}return{type:v.Element,tagName:y,attributes:b,childNodes:[],isSVG:Q(t)||void 0,needBlock:w,rootId:g,isCustom:n}}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,o=C.parentNode(t),a=o&&o.tagName,h=C.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{t.nextSibling||t.previousSibling||(null==(r=o.sheet)?void 0:r.cssRules)&&(h=R(o.sheet))}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=P(h,tt(e.doc))}l&&(h="SCRIPT_PLACEHOLDER");!u&&!l&&h&&i&&(h=n?n(h,C.parentElement(t)):h.replace(/[\S]/g,"*"));return{type:v.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:o,maskTextFn:u,rootId:g});case t.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:g};case t.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(t)||"",rootId:g};default:return!1}}function ot(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function at(t){return null==t?"":t.toLowerCase()}var ht=50,ut=!1,lt=!1;function ct(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:R=(()=>!1),newlyAddedElement:_=!1,depth:O=0,maxDepth:T=ht}=e,{needsMask:E}=e,{preserveWhiteSpace:A=!0}=e;if(O>=T)return lt=!0,ut||(ut=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+T+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;E||(E=nt(t,o,a,void 0===E));var B,F=st(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:E,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:_});if(!F)return console.warn(t,"not serialized"),null;B=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===v.Comment)return!0;if(t.type===v.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===L(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(at(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===at(t.attributes.name)||"icon"===at(t.attributes.rel)||"apple-touch-icon"===at(t.attributes.rel)||"shortcut icon"===at(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&at(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(at(t.attributes.property).match(/^(og|twitter|fb):/)||at(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===at(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===at(t.attributes.name)||"googlebot"===at(t.attributes.name)||"bingbot"===at(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===at(t.attributes.name)||"generator"===at(t.attributes.name)||"framework"===at(t.attributes.name)||"publisher"===at(t.attributes.name)||"progid"===at(t.attributes.name)||at(t.attributes.property).match(/^article:/)||at(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===at(t.attributes.name)||"yandex-verification"===at(t.attributes.name)||"csrf-token"===at(t.attributes.name)||"p:domain_verify"===at(t.attributes.name)||"verify-v1"===at(t.attributes.name)||"verification"===at(t.attributes.name)||"shopify-checkout-api-token"===at(t.attributes.name)))return!0}}return!1}(F,d)&&(A||F.type!==v.Text||F.isStyle||F.textContent.replace(/^\s+|\s+$/gm,"").length)?Y():V;var N=Object.assign(F,{id:B});if(i.add(t,N),B===V)return null;w&&w(t);var D=!h;if(N.type===v.Element){D=D&&!N.needBlock,delete N.needBlock;var j=C.shadowRoot(t);j&&x(j)&&(N.isShadowHost=!0)}if((N.type===v.Document||N.type===v.Element)&&D){d.headWhitespace&&N.type===v.Element&&"head"===N.tagName&&(A=!1);var P={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:E,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O+1,maxDepth:T};if(N.type===v.Element&&"textarea"===N.tagName&&void 0!==N.attributes.value);else for(var U of Array.from(C.childNodes(t))){var W=ct(U,P);W&&N.childNodes.push(W)}var z=null;if(I(t)&&(z=C.shadowRoot(t)))for(var q of Array.from(C.childNodes(z))){var H=ct(q,P);H&&(x(z)&&(H.isShadow=!0),N.childNodes.push(H))}}var G=C.parentNode(t);return G&&M(G)&&x(G)&&(N.isShadow=!0),N.type===v.Element&&"iframe"===N.tagName&&function(t,e,r){var i=t.contentWindow;if(i){var n,s=!1;try{n=i.document.readyState}catch(t){return}if("complete"===n){var o="about:blank";if(i.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var a=setTimeout((()=>{s||(e(),s=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(a),s=!0,e()}))}}}(t,(()=>{var e=t.contentDocument;if(e&&y){var r=ct(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:E,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O+1,maxDepth:T});r&&y(t,r)}}),b),N.type===v.Element&&"link"===N.tagName&&"string"==typeof N.attributes.rel&&("stylesheet"===N.attributes.rel||"preload"===N.attributes.rel&&"string"==typeof N.attributes.href&&"css"===L(N.attributes.href))&&function(t,e,r){var i,n=!1;try{i=t.sheet}catch(t){return}if(!i){var s=setTimeout((()=>{n||(e(),n=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(s),n=!0,e()}))}}(t,(()=>{if(S){var e=ct(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:E,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:A,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O,maxDepth:T});e&&S(t,e)}}),k),N}function ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function dt(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),r}var vt,pt={exports:{}};function mt(){if(vt)return pt.exports;vt=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return pt.exports=e(),pt.exports.createColors=e,pt.exports}var gt,wt,yt,bt,St,kt,Ct=dt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function It(){if(wt)return gt;wt=1;var t=mt(),e=Ct;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return gt=r,r.default=r,gt}function Mt(){if(bt)return yt;bt=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes)this.block(t,r+i);else{var n=(t.raws.between||"")+(e?";":"");this.builder(r+i+n,t)}}beforeAfter(t,e){var r;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;o0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;i{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return yt=e,e.default=e,yt}function xt(){if(kt)return St;kt=1;var t=Mt();function e(e,r){new t(r).stringify(e)}return St=e,e.default=e,St}var Rt,_t,Ot,Tt,Et,At,Bt,Lt,Ft,Nt,Dt,jt,Pt,Ut,Wt,$t,zt,qt,Ht,Gt,Vt,Yt,Zt,Jt,Xt,Kt,Qt,te,ee,re,ie,ne,se,oe,ae,he,ue,le,ce,fe,de,ve,pe,me,ge,we,ye,be,Se,ke,Ce,Ie,Me,xe={};function Re(){return Rt||(Rt=1,xe.isClean=Symbol("isClean"),xe.my=Symbol("my")),xe}function _e(){if(Ot)return _t;Ot=1;var t=It(),e=Mt(),r=xt(),{isClean:i,my:n}=Re();function s(t,e){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;s"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;a"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return _t=a,a.default=a,_t}function Oe(){if(Et)return Tt;Et=1;var t=_e();class e extends t{constructor(t){super(t),this.type="comment"}}return Tt=e,e.default=e,Tt}function Te(){if(Bt)return At;Bt=1;var t=_e();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return At=e,e.default=e,At}function Ee(){if(Ft)return Lt;Ft=1;var t,e,r,i,n=Oe(),s=Te(),o=_e(),{isClean:a,my:h}=Re();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(){for(var t=arguments.length,e=new Array(t),r=0;r"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;n"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;nt.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=0===i&&"prepend",s=this.normalize(e,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(t),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;r=t&&(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Lt=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Lt}function Ae(){if(Dt)return Nt;Dt=1;var t=Ee();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Nt=e,e.default=e,t.registerAtRule(e),Nt}function Be(){if(Pt)return jt;Pt=1;var t,e,i=Ee();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},jt=n,n.default=n,jt}function Le(){if(Wt)return Ut;Wt=1;return Ut={nanoid:function(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(t,e){return void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i}}}}function Fe(){if(zt)return $t;zt=1;var{existsSync:t,readFileSync:e}=Ct,{dirname:r,join:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,n=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),n&&(this.text=n)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return $t=o,o.default=o,$t}function Ne(){if(Ht)return qt;Ht=1;var{nanoid:t}=Le(),{isAbsolute:e,resolve:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct,{fileURLToPath:o,pathToFileURL:a}=Ct,h=It(),u=Fe(),l=Ct,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;n"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){u=c.offset;var d=this.fromOffset(u);e=d.line,r=d.col}else e=c.line,r=c.column,u=this.fromLineAndColumn(e,r);if("number"==typeof f.offset){o=f.offset;var v=this.fromOffset(o);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{u=e;var p=this.fromOffset(u);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(t>=e[e.length-1])r=e.length-1;else for(var i,n=e.length-2;r>1)])n=i-1;else{if(!(t>=e[i+1])){r=i;break}r=i+1}return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return qt=p,p.default=p,l&&l.registerInput&&l.registerInput(p),qt}function De(){if(Vt)return Gt;Vt=1;var t,e,r=Ee();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Gt=i,i.default=i,r.registerRoot(i),Gt}function je(){if(Zt)return Yt;Zt=1;var t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Yt=t,t.default=t,Yt}function Pe(){if(Xt)return Jt;Xt=1;var t=Ee(),e=je();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Jt=r,r.default=r,t.registerRule(r),Jt}function Ue(){if(ee)return te;ee=1;var{dirname:t,relative:e,resolve:r,sep:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct,{pathToFileURL:o}=Ct,a=Ne(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return te=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}},te}function We(){if(ie)return re;ie=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return re=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,E,A,B,L,F=C.css.valueOf(),N=I.ignoreErrors,D=F.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back:function(t){U.push(t)},endOfFile:function(){return 0===U.length&&j>=D},nextToken:function(C){if(U.length)return U.pop();if(!(j>=D)){var I=!!C&&C.ignoreUnclosed;switch(M=F.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{_+=1,M=F.charCodeAt(_)}while(M===s||M===n||M===a||M===h||M===o);T=["space",F.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=F.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(E=!1,-1===(_=F.indexOf(")",_+1))){if(N||I){_=j;break}W("bracket")}for(A=_;F.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["brackets",F.slice(j,_+1),j,_],j=_}else _=F.indexOf(")",j+1),x=F.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(E=!1,-1===(_=F.indexOf(O,_+1))){if(N||I){_=j+1;break}W("string")}for(A=_;F.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["string",F.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(F),_=0===y.lastIndex?F.length-1:y.lastIndex-2,T=["at-word",F.slice(j,_+1),j,_],j=_;break;case r:for(_=j,R=!0;F.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=F.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&(_+=1,k.test(F.charAt(_)))){for(;k.test(F.charAt(_+1));)_+=1;F.charCodeAt(_+1)===s&&(_+=1)}T=["word",F.slice(j,_+1),j,_],j=_;break;default:M===i&&F.charCodeAt(j+1)===m?(0===(_=F.indexOf("*/",j+2)+1)&&(N||I?_=F.length:W("comment")),T=["comment",F.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(F),_=0===b.lastIndex?F.length-1:b.lastIndex-2,T=["word",F.slice(j,_+1),j,_],P.push(T),j=_)}return j++,T}},position:function(){return j}}}}function $e(){if(se)return ne;se=1;var t=Ae(),e=Oe(),r=Te(),i=De(),n=Pe(),s=We(),o={empty:!0,space:!0};return ne=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(e=h[h.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a,h,u=r.length,l="",c=!0,f=0;ft+e[1]),"");t.raws[e]={raw:d,value:l}}t[e]=l}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;i"warning"===t.type))}}return le=e,e.default=e,le}function Ge(){if(de)return fe;de=1;var t={};return fe=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Ve(){if(pe)return ve;pe=1;var t=Ee(),i=Be(),n=Ue(),s=ze(),o=He(),a=De(),h=xt(),{isClean:u,my:l}=Re(),c=Ge(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=y(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;e0;){var o=t.visitTick(s);if(m(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=l;try{if("document"===n.type){var r=n.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[l,c]of t.listeners.OnceExit)yield*h(c)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(m(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&e.visitorIndex{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},ve=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),ve}function Ye(){if(ye)return we;ye=1;var t=Be(),e=Ve(),r=function(){if(ge)return me;ge=1;var t=Ue(),e=ze(),r=He(),i=xt(),n=Ge();class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get:()=>h.root});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}}return me=s,s.default=s,me}(),i=De();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return we=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),we}function Ze(){if(Se)return be;Se=1;var t=Ae(),e=Oe(),n=Ee(),a=It(),h=Te(),u=Be(),l=function(){if(Qt)return Kt;Qt=1;var t=Ae(),e=Oe(),n=Te(),a=Ne(),h=Fe(),u=De(),l=Pe();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,s);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:a.prototype});g.map&&(g.map=r({},g.map,{__proto__:h.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,o);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Kt=c,c.default=c,Kt}(),c=Ne(),f=Ve(),d=je(),v=_e(),p=ze(),m=Ye(),g=He(),w=De(),y=Pe(),b=xt(),S=qe();function k(){for(var t=arguments.length,e=new Array(t),r=0;r(r||(r=n()),r)}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new h(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=a,k.Declaration=h,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),be=k,k.default=k,be}!function(){if(Me)return Ie;Me=1;var{Input:t}=Ze(),e=function(){if(Ce)return ke;Ce=1;var t=Oe(),e=$e(),r=We();return ke=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(!(0===r||r<0)){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();Ie=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}();var Je=ft(Ze());Je.stringify,Je.fromJSON,Je.plugin,Je.parse,Je.list,Je.document,Je.comment,Je.atRule,Je.rule,Je.decl,Je.root,Je.CssSyntaxError,Je.Declaration,Je.Container,Je.Processor,Je.Document,Je.Comment,Je.Warning,Je.AtRule,Je.Result,Je.Input,Je.Rule,Je.Root,Je.Node;var Xe=Object.defineProperty,Ke=(t,e,r)=>((t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function Qe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tr(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),r}var er,rr={exports:{}};function ir(){if(er)return rr.exports;er=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return rr.exports=e(),rr.exports.createColors=e,rr.exports}var nr,sr,or,ar,hr,ur,lr=tr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function cr(){if(sr)return nr;sr=1;var t=ir(),e=lr;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return nr=r,r.default=r,nr}function fr(){if(ar)return or;ar=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes)this.block(t,r+i);else{var n=(t.raws.between||"")+(e?";":"");this.builder(r+i+n,t)}}beforeAfter(t,e){var r;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;o0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;i{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return or=e,e.default=e,or}function dr(){if(ur)return hr;ur=1;var t=fr();function e(e,r){new t(r).stringify(e)}return hr=e,e.default=e,hr}var vr,pr,mr,gr,wr,yr,br,Sr,kr,Cr,Ir,Mr,xr,Rr,_r,Or,Tr,Er,Ar,Br,Lr,Fr,Nr,Dr,jr,Pr,Ur,Wr,$r,zr,qr,Hr,Gr,Vr,Yr,Zr,Jr,Xr,Kr,Qr,ti,ei,ri,ii,ni,si,oi,ai,hi,ui,li,ci,fi,di={};function vi(){return vr||(vr=1,di.isClean=Symbol("isClean"),di.my=Symbol("my")),di}function pi(){if(mr)return pr;mr=1;var t=cr(),e=fr(),r=dr(),{isClean:i,my:n}=vi();function s(t,e){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;s"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;a"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return pr=a,a.default=a,pr}function mi(){if(wr)return gr;wr=1;var t=pi();class e extends t{constructor(t){super(t),this.type="comment"}}return gr=e,e.default=e,gr}function gi(){if(br)return yr;br=1;var t=pi();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return yr=e,e.default=e,yr}function wi(){if(kr)return Sr;kr=1;var t,e,r,i,n=mi(),s=gi(),o=pi(),{isClean:a,my:h}=vi();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(){for(var t=arguments.length,e=new Array(t),r=0;r"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;n"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;nt.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0)}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=0===i&&"prepend",s=this.normalize(e,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(t),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;r=t&&(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Sr=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Sr}function yi(){if(Ir)return Cr;Ir=1;var t=wi();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Cr=e,e.default=e,t.registerAtRule(e),Cr}function bi(){if(xr)return Mr;xr=1;var t,e,i=wi();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},Mr=n,n.default=n,Mr}function Si(){if(_r)return Rr;_r=1;return Rr={nanoid:function(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(t,e){return void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i}}}}function ki(){if(Tr)return Or;Tr=1;var{existsSync:t,readFileSync:e}=lr,{dirname:r,join:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,n=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),n&&(this.text=n)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Or=o,o.default=o,Or}function Ci(){if(Ar)return Er;Ar=1;var{nanoid:t}=Si(),{isAbsolute:e,resolve:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr,{fileURLToPath:o,pathToFileURL:a}=lr,h=cr(),u=ki(),l=lr,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;n"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){u=c.offset;var d=this.fromOffset(u);e=d.line,r=d.col}else e=c.line,r=c.column,u=this.fromLineAndColumn(e,r);if("number"==typeof f.offset){o=f.offset;var v=this.fromOffset(o);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{u=e;var p=this.fromOffset(u);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(t>=e[e.length-1])r=e.length-1;else for(var i,n=e.length-2;r>1)])n=i-1;else{if(!(t>=e[i+1])){r=i;break}r=i+1}return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return Er=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Er}function Ii(){if(Lr)return Br;Lr=1;var t,e,r=wi();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Br=i,i.default=i,r.registerRoot(i),Br}function Mi(){if(Nr)return Fr;Nr=1;var t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Fr=t,t.default=t,Fr}function xi(){if(jr)return Dr;jr=1;var t=wi(),e=Mi();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Dr=r,r.default=r,t.registerRule(r),Dr}function Ri(){if($r)return Wr;$r=1;var{dirname:t,relative:e,resolve:r,sep:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr,{pathToFileURL:o}=lr,a=Ci(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Wr=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}},Wr}function _i(){if(qr)return zr;qr=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return zr=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,E,A,B,L,F=C.css.valueOf(),N=I.ignoreErrors,D=F.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back:function(t){U.push(t)},endOfFile:function(){return 0===U.length&&j>=D},nextToken:function(C){if(U.length)return U.pop();if(!(j>=D)){var I=!!C&&C.ignoreUnclosed;switch(M=F.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{_+=1,M=F.charCodeAt(_)}while(M===s||M===n||M===a||M===h||M===o);T=["space",F.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=F.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(E=!1,-1===(_=F.indexOf(")",_+1))){if(N||I){_=j;break}W("bracket")}for(A=_;F.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["brackets",F.slice(j,_+1),j,_],j=_}else _=F.indexOf(")",j+1),x=F.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(E=!1,-1===(_=F.indexOf(O,_+1))){if(N||I){_=j+1;break}W("string")}for(A=_;F.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["string",F.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(F),_=0===y.lastIndex?F.length-1:y.lastIndex-2,T=["at-word",F.slice(j,_+1),j,_],j=_;break;case r:for(_=j,R=!0;F.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=F.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&(_+=1,k.test(F.charAt(_)))){for(;k.test(F.charAt(_+1));)_+=1;F.charCodeAt(_+1)===s&&(_+=1)}T=["word",F.slice(j,_+1),j,_],j=_;break;default:M===i&&F.charCodeAt(j+1)===m?(0===(_=F.indexOf("*/",j+2)+1)&&(N||I?_=F.length:W("comment")),T=["comment",F.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(F),_=0===b.lastIndex?F.length-1:b.lastIndex-2,T=["word",F.slice(j,_+1),j,_],P.push(T),j=_)}return j++,T}},position:function(){return j}}}}function Oi(){if(Gr)return Hr;Gr=1;var t=yi(),e=mi(),r=gi(),i=Ii(),n=xi(),s=_i(),o={empty:!0,space:!0};return Hr=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(e=h[h.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a,h,u=r.length,l="",c=!0,f=0;ft+e[1]),"");t.raws[e]={raw:d,value:l}}t[e]=l}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;i"warning"===t.type))}}return Xr=e,e.default=e,Xr}function Bi(){if(ti)return Qr;ti=1;var t={};return Qr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Li(){if(ri)return ei;ri=1;var t=wi(),i=bi(),n=Ri(),s=Ti(),o=Ai(),a=Ii(),h=dr(),{isClean:u,my:l}=vi(),c=Bi(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=y(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;e0;){var o=t.visitTick(s);if(m(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=l;try{if("document"===n.type){var r=n.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[l,c]of t.listeners.OnceExit)yield*h(c)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(m(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&e.visitorIndex{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},ei=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),ei}function Fi(){if(oi)return si;oi=1;var t=bi(),e=Li(),r=function(){if(ni)return ii;ni=1;var t=Ri(),e=Ti(),r=Ai(),i=dr(),n=Bi();class s{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get:()=>h.root});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}}return ii=s,s.default=s,ii}(),i=Ii();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return si=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),si}function Ni(){if(hi)return ai;hi=1;var t=yi(),e=mi(),n=wi(),s=cr(),o=gi(),u=bi(),l=function(){if(Ur)return Pr;Ur=1;var t=yi(),e=mi(),n=gi(),s=Ci(),o=ki(),u=Ii(),l=xi();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,a);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:s.prototype});g.map&&(g.map=r({},g.map,{__proto__:o.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,h);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Pr=c,c.default=c,Pr}(),c=Ci(),f=Li(),d=Mi(),v=pi(),p=Ti(),m=Fi(),g=Ai(),w=Ii(),y=xi(),b=dr(),S=Ei();function k(){for(var t=arguments.length,e=new Array(t),r=0;r(r||(r=n()),r)}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new o(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=s,k.Declaration=o,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),ai=k,k.default=k,ai}!function(){if(fi)return ci;fi=1;var{Input:t}=Ni(),e=function(){if(li)return ui;li=1;var t=mi(),e=Oi(),r=_i();return ui=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(!(0===r||r<0)){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();ci=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}();var Di=Qe(Ni());Di.stringify,Di.fromJSON,Di.plugin,Di.parse,Di.list,Di.document,Di.comment,Di.atRule,Di.rule,Di.decl,Di.root,Di.CssSyntaxError,Di.Declaration,Di.Container,Di.Processor,Di.Document,Di.Comment,Di.Warning,Di.AtRule,Di.Result,Di.Input,Di.Rule,Di.Root,Di.Node;class ji{constructor(){Ke(this,"parentElement",null),Ke(this,"parentNode",null),Ke(this,"ownerDocument"),Ke(this,"firstChild",null),Ke(this,"lastChild",null),Ke(this,"previousSibling",null),Ke(this,"nextSibling",null),Ke(this,"ELEMENT_NODE",1),Ke(this,"TEXT_NODE",3),Ke(this,"nodeType"),Ke(this,"nodeName"),Ke(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof ji))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var Pi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ui={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Wi={};function $i(t){if(Wi[t])return Wi[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Pi?Pi[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Ui?Ui[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Wi[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?Wi[t]=u:r}catch(t){return r}}var zi={};function qi(t,e,r){var i,n=t+"."+String(r);if(zi[n])return zi[n].call(e);var s=$i(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(zi[n]=o,o.call(e)):e[r]}var Hi={};function Gi(t,e,r){var i=t+"."+String(r);if(Hi[i])return Hi[i].bind(e);var n=$i(t)[r];return"function"!=typeof n?e[r]:(Hi[i]=n,n.bind(e))}function Vi(){return $i("MutationObserver").constructor}function Yi(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var Zi={childNodes:function(t){return qi("Node",t,"childNodes")},parentNode:function(t){return qi("Node",t,"parentNode")},parentElement:function(t){return qi("Node",t,"parentElement")},textContent:function(t){return qi("Node",t,"textContent")},contains:function(t,e){return Gi("Node",t,"contains")(e)},getRootNode:function(t){return Gi("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?qi("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?qi("Element",t,"shadowRoot"):null},querySelector:function(t,e){return qi("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return qi("Element",t,"querySelectorAll")(e)},mutationObserver:Vi,patch:Yi};function Ji(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}var Xi="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Ki={map:{},getId:()=>(console.error(Xi),-1),getNode:()=>(console.error(Xi),null),removeNodeFromMap(){console.error(Xi)},has:()=>(console.error(Xi),!1),reset(){console.error(Xi)}};function Qi(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;ae?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function tn(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>tn(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ki=new Proxy(Ki,{get:(t,e,r)=>("map"===e&&console.error(Xi),Reflect.get(t,e,r))}));var en=Date.now;function rn(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=Zi.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=Zi.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function nn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function on(t){return t?t.nodeType===t.ELEMENT_NODE?t:Zi.parentElement(t):null}function an(t,e,r,i){if(!t)return!1;var n=on(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(it(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function hn(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===V}function un(t,e){if(M(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=Zi.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||un(i,e))}function ln(t){return Boolean(t.changedTouches)}function cn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function fn(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function dn(t){return!!t&&(t instanceof ji&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Zi.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(en=()=>(new Date).getTime());class vn{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function pn(t){var e,r=null;return"getRootNode"in t&&(null==(e=Zi.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Zi.host(Zi.getRootNode(t))&&(r=Zi.host(Zi.getRootNode(t))),r}function mn(t){var e=t.ownerDocument;if(!e)return!1;var r=function(t){for(var e,r=t;e=pn(r);)r=e;return r}(t);return Zi.contains(e,r)}function gn(t){var e=t.ownerDocument;return!!e&&(Zi.contains(e,t)||mn(t))}var wn=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(wn||{}),yn=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(yn||{}),bn=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(bn||{}),Sn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Sn||{}),kn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(kn||{}),Cn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Cn||{}),In=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(In||{});function Mn(t){return"__ln"in t}class xn{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;rt+"@"+e;class On{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new xn,i=t=>{for(var e=t,r=V;r===V;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=Zi.parentNode(n);if(s&&gn(n)&&"TEXTAREA"!==s.tagName){var o=M(s)?this.mirror.getId(pn(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=ct(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{cn(t,this.mirror)&&this.iframeManager.addIframe(t),fn(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),dn(n)&&this.shadowDomManager.addShadowRoot(Zi.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)En(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(Zi.parentNode(s))||n(s);for(var o of this.addedSet)An(this.droppedSet,o)||En(this.removesSubTreeCache,o,this.mirror)?An(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId(Zi.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=r.tail;c;){var f=c;if(c=c.previous,f){var d=this.mirror.getId(Zi.parentNode(f.value));if(-1===i(f.value))continue;if(-1!==d){h=f;break}var v=f.value,p=Zi.parentNode(v);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=Zi.host(p);if(-1!==this.mirror.getId(m)){h=f;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var g={texts:this.texts.map((t=>{var e=t.node,r=Zi.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);r.length!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(g))}})),c(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(Zi.childNodes(t),(t=>Zi.textContent(t)||"")).join("")})),c(this,"processMutation",(t=>{if(!hn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=Zi.textContent(t.target);an(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:nt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,on(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=B(r);n=T({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(an(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!rt(r.tagName,i))if(o.attributes[i]=et(this.doc,E(r.tagName),E(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===r.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break;case"childList":if(an(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=M(t.target)?this.mirror.getId(Zi.host(t.target)):this.mirror.getId(t.target);an(t.target,this.blockClass,this.blockSelector,!1)||hn(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Tn(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||un(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[_n(r,i)]?Tn(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!M(t.target)||!x(t.target))||void 0}),function(t,e){var r=[t];for(;r.length;){var i=r.pop();e.has(i)||(e.add(i),Zi.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),c(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(hn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[_n(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);an(t,this.blockClass,this.blockSelector,!1)||(Zi.childNodes(t).forEach((t=>this.genAdds(t))),dn(t)&&Zi.childNodes(Zi.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Tn(t,e){t.delete(e),Zi.childNodes(e).forEach((e=>Tn(t,e)))}function En(t,e,r){return 0!==t.size&&function(t,e,r){var i=Zi.parentNode(e);return!!i&&t.has(i)}(t,e)}function An(t,e){return 0!==t.size&&Bn(t,e)}function Bn(t,e){var r=Zi.parentNode(e);return!!r&&(!!t.has(r)||Bn(t,r))}var Ln=t=>{if(!Rn)return t;return function(){try{return t(...arguments)}catch(t){if(Rn&&!0===Rn(t))return;throw t}}},Fn=[];function Nn(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Dn(t,e){var r=new On;Fn.push(r),r.init(t);var i=new(Vi())(Ln(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function jn(t){var{mouseInteractionCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(bn).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=E(t),h=(t=>i=>{var a=Nn(i);if(!an(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=Sn.Mouse;break;case"touch":h=Sn.Touch;break;case"pen":h=Sn.Pen}h===Sn.Touch?bn[t]===bn.MouseDown?u="TouchStart":bn[t]===bn.MouseUp&&(u="TouchEnd"):Sn.Pen}else ln(i)&&(h=Sn.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Sn.Touch||u.startsWith("Mouse")&&h===Sn.Mouse)&&(h=null)):bn[t]===bn.Click&&(h=l,l=null);var c=ln(i)?i.changedTouches[0]:i;if(c){var f=n.getId(a),{clientX:d,clientY:v}=c;Ln(e)(r({type:bn[u],id:f,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(bn[t]){case bn.MouseDown:case bn.MouseUp:a=a.replace("mouse","pointer");break;case bn.TouchStart:case bn.TouchEnd:return}u.push(Ji(a,h,i))})),Ln((()=>{u.forEach((t=>t()))}))}function Pn(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t;return Ji("scroll",Ln(Qi(Ln((t=>{var o=Nn(t);if(o&&!an(o,n,s,!0)){var a=i.getId(o);if(o===r&&r.defaultView){var h=rn(r.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}})),o.scroll||100)),r)}var Un=["INPUT","TEXTAREA","SELECT"],Wn=new WeakMap;function $n(t){return function(t,e){if(Gn("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Gn("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Gn("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Gn("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var r=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(r)}else if(t.parentStyleSheet){var i=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(i)}return e}(t,[])}function zn(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function qn(t,e){var r,i,n,{mirror:s,stylesheetManager:o}=t,a=null;a="#document"===e.nodeName?s.getId(e):s.getId(Zi.host(e));var h="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,r=null==(e=u.set)?void 0:e.call(this,t);if(null!==a&&-1!==a)try{o.adoptStyleSheets(t,a)}catch(t){}return r}}),Ln((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function Hn(t,e){void 0===e&&(e={});var i,n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:v}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),f(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM&&(i=Dn(t,t.doc));var s=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=Qi(Ln((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=Ln(Qi(Ln((t=>{var e=Nn(t),{clientX:r,clientY:i}=ln(t)?t.changedTouches[0]:t;s||(s=en()),h.push({x:r,y:i,id:n.getId(e),timeOffset:en()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?yn.Drag:t instanceof MouseEvent?yn.MouseMove:yn.TouchMove)})),o,{trailing:!1})),c=[Ji("mousemove",l,i),Ji("touchmove",l,i),Ji("drag",l,i)];return Ln((()=>{c.forEach((t=>t()))}))}(t),o=jn(t),a=Pn(t),h=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return Ji("resize",Ln(Qi(Ln((()=>{var t=nn(),e=sn();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:n}),u=function(t){var{inputCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:f}=t;function d(t){var e=Nn(t),r=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=Zi.parentElement(e)),e&&n&&!(Un.indexOf(n)<0)&&!an(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,d=!1,p=B(e)||"";"radio"===p||"checkbox"===p?d=e.checked:(u[n.toLowerCase()]||u[p])&&(c=T({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),v(e,f?{text:c,isChecked:d,userTriggered:r}:{text:c,isChecked:d});var m=e.name;"radio"===p&&m&&d&&i.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!d,userTriggered:!1}:{text:r,isChecked:!d})}}))}}function v(t,i){var s=Wn.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){Wn.set(t,i);var o=n.getId(t);Ln(e)(r({},i,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map((t=>Ji(t,Ln(d),i))),m=i.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),w=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...w.map((t=>tn(t[0],t[1],{set(){Ln(d)({target:this,isTrusted:!1})}},!1,m)))),Ln((()=>{p.forEach((t=>t()))}))}(t),l=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:o}=t,a=Ln((t=>Qi(Ln((s=>{var o=Nn(s);if(o&&!an(o,r,i,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}})),s.media||500))),h=[Ji("play",a(Cn.Play),o),Ji("pause",a(Cn.Pause),o),Ji("seeked",a(Cn.Seeked),o),Ji("volumechange",a(Cn.VolumeChange),o),Ji("ratechange",a(Cn.RateChange),o)];return Ln((()=>{h.forEach((t=>t()))}))}(t),c=()=>{},f=()=>{},d=()=>{},v=()=>{};t.recordDOM&&(c=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Ln(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=zn(e,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){void 0===r&&(r=this.cssRules.length);var i=t+" { "+e+" }";return s.CSSStyleSheet.prototype.insertRule.apply(this,[i,r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replace:o}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replaceSync:o}),t.apply(e,s)}))}));var l={};Vn("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Vn("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Vn("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Vn("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach((t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Ln(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=zn(e.parentStyleSheet,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:[...$n(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e.parentStyleSheet,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:[...$n(e),o]}]}),t.apply(e,s)}))})})),Ln((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var[e,r]=t;r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:n}),f=qn(t,t.doc),d=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Ln(((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:f,styleId:d}=zn(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror);return(f&&-1!==f||d&&-1!==d)&&r({id:f,styleId:d,set:{property:u,value:l,priority:c},index:$n(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:Ln(((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=zn(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,remove:{property:u},index:$n(e.parentRule)}),t.apply(e,o)}))}),Ln((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:n}),t.collectFonts&&(v=function(t){var{fontCb:e,doc:r}=t,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=Yi(r.fonts,"add",(function(t){return function(r){return setTimeout(Ln((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),Ln((()=>{n.forEach((t=>t()))}))}(t)));var p=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,o=!0,a=Ln((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;u{}}(t),g=[];for(var w of t.plugins)g.push(w.observer(w.callback,n,w.options));return Ln((()=>{Fn.forEach((t=>t.destroy())),Fn.forEach((t=>t.reset())),null==i||i.disconnect(),s(),o(),a(),h(),u(),l(),c(),f(),d(),v(),p(),m(),g.forEach((t=>t())),Fn.length=0}))}function Gn(t){return void 0!==window[t]}function Vn(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Yn{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;var n=i.get(e);return n||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class Zn{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Yn(Y)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),c(this,"messageHandler"),c(this,"nestedIframeListeners",new Map),c(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var n=t.contentWindow;if(this.recordCrossOriginIframes&&n&&!this.nestedIframeListeners.has(n)){var s=this.handleMessage.bind(this);this.nestedIframeListeners.set(n,s),n.addEventListener("message",s)}null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case wn.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:wn.IncrementalSnapshot,data:{source:yn.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case wn.Meta:case wn.Load:case wn.DomContentLoaded:return!1;case wn.Plugin:return e;case wn.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case wn.IncrementalSnapshot:switch(e.data.source){case yn.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case yn.Drag:case yn.TouchMove:case yn.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case yn.ViewportResize:return!1;case yn.MediaInteraction:case yn.MouseInteraction:case yn.Scroll:case yn.CanvasMutation:case yn.Input:return this.replaceIds(e.data,t,["id"]),e;case yn.StyleSheetRule:case yn.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case yn.Font:return e;case yn.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case yn.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(Array.isArray(e[n])?e[n]=t.getIds(r,e[n]):e[n]=t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===In.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.mirror.getNode(t);if(r){var i=r.contentWindow;if(i&&this.nestedIframeListeners.has(i)){var n=this.nestedIframeListeners.get(i);i.removeEventListener("message",n),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r)}e&&this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{e.removeEventListener("message",t)})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Jn{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var i=Dn(r({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>i.disconnect())),this.restoreHandlers.push(Pn(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Zi.host(t))),this.restoreHandlers.push(qn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push(Yi(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=Zi.shadowRoot(this);return s&&gn(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Qn=0;Qn<64;Qn++)Kn[Xn.charCodeAt(Qn)]=Qn;var ts=new Map;var es=(t,e,r)=>{if(t&&(ns(t,e)||"object"==typeof t)){var i=function(t,e){var r=ts.get(t);return r||(r=new Map,ts.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function rs(t,e,r,i){if(t instanceof Array)return t.map((t=>rs(t,e,r,i)));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;e>2],n+=Xn[(3&r[e])<<4|r[e+1]>>4],n+=Xn[(15&r[e+1])<<2|r[e+2]>>6],n+=Xn[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[rs(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var n=t.constructor.name,{src:s}=t;return{rr_type:n,src:s}}if(t instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[rs(t.data,e,r,i),t.width,t.height]}:ns(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:es(t,e,r)}:t}var is=(t,e,r,i)=>t.map((t=>rs(t,e,r,i))),ns=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))};function ss(t,e,r,i){var n=[];try{var s=Yi(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a{n.forEach((t=>t()))}}function os(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=Yi(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;l{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ls),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ds{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"rafIdTimestamp",null),c(this,"rafIdFlush",null),c(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,o),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,i,n,s){var o=this;if("OffscreenCanvas"in r){var a=ss(r,i,n,!0),h=new Map,u=new fs;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:kn["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}],displayWidth:n,displayHeight:s})}};var l,c=1e3/t,f=0,d=t=>{var a,v;f&&t-f{t.querySelectorAll("canvas").forEach((t=>{an(t,i,n,!0)||a.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))},v(r.document),a).forEach(function(){var t=e((function*(t){var e,r=o.mirror.getId(t);if(!h.get(r)&&0!==t.width&&0!==t.height){if(h.set(r,!0),["webgl","webgl2"].includes(t.__context)){var i=t.getContext(t.__context);!1===(null==(e=null==i?void 0:i.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}var n=t.clientWidth||t.width,a=t.clientHeight||t.height,l=yield createImageBitmap(t,{resizeWidth:n,resizeHeight:a});u.postMessage({id:r,bitmap:l,width:n,height:a,dataURLOptions:s.dataURLOptions},[l])}}));return function(e){return t.apply(this,arguments)}}()),l=requestAnimationFrame(d))};l=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=ss(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=Yi(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;u{var r=is(h,e,this,n);t(this.canvas,{type:kn["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=tn(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:kn["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return s.push(...os(e.WebGLRenderingContext.prototype,kn.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...os(e.WebGL2RenderingContext.prototype,kn.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,u))),{type:s}=r[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class vs{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new vn),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:_(e,t.href),index:r})))})),i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class ps{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var ms=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var gs=document.createElement("iframe");document.body.appendChild(gs),Array.from=(null==(n=gs.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(gs)}}catch(t){console.debug("Unable to override Array.from",t)}var ws,ys,bs=new O;function Ss(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:w,sampling:y={},dataURLOptions:b={},mousemoveWait:S,recordDOM:k=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:R=!1,inlineImages:_=!1,plugins:T,keepIframeSrcFn:E=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:B}=t;Rn=B;var L=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},b),F=!I||window.parent===window,N=!1;if(!F)try{window.parent.document&&(N=!1)}catch(t){N=!0}if(F&&!e)throw new Error("emit function is required");if(!F&&!N)return()=>{};void 0!==S&&void 0===y.mousemove&&(y.mousemove=S),bs.reset();var D,j=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==d?d:{password:!0},P=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v,headTitleMutations:"all"===v}:v||{};!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var U=0,W=t=>{for(var e of T||[])e.eventProcessor&&(t=e.eventProcessor(t));return w&&!N&&(t=w(t)),t};as=(t,r)=>{var s,o=t;if(o.timestamp=en(),!(null==(s=Fn[0])?void 0:s.isFrozen())||o.type===wn.FullSnapshot||o.type===wn.IncrementalSnapshot&&o.data.source===yn.Mutation||Fn.forEach((t=>t.unfreeze())),F)null==e||e(W(o),r);else if(N){var a={type:"rrweb",event:W(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(o.type===wn.FullSnapshot)D=o,U=0;else if(o.type===wn.IncrementalSnapshot){if(o.data.source===yn.Mutation&&o.data.isAttachIframe)return;U++;var h=n&&U>=n,u=i&&o.timestamp-D.timestamp>i;(h||u)&&hs(!0)}};var z=t=>{if(I&&t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null;t.removes.forEach((t=>{var{id:r}=t;e&&e.has(r)||V.removeIframeById(r)}))}as({type:wn.IncrementalSnapshot,data:r({source:yn.Mutation},t)})},q=t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Scroll},t)}),H=t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.CanvasMutation},t)}),G=new vs({mutationCb:z,adoptedStyleSheetCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.AdoptedStyleSheet},t)})}),V=new Zn({mirror:bs,mutationCb:z,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:as});for(var Y of T||[])Y.getMirror&&Y.getMirror({nodeMirror:bs,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});var Z=new ps;us=new ds({recordCanvas:C,mutationCb:H,win:window,blockClass:s,blockSelector:o,mirror:bs,sampling:y.canvas,dataURLOptions:L});var J=new Jn({mutationCb:z,scrollCb:q,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:j,dataURLOptions:L,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:_,sampling:y,slimDOMOptions:P,iframeManager:V,stylesheetManager:G,canvasManager:us,keepIframeSrcFn:E,processedNodeManager:Z},mirror:bs});hs=function(t){if(void 0===t&&(t=!1),k){as({type:wn.Meta,data:{href:window.location.href,width:sn(),height:nn()}},t),G.reset(),J.init(),Fn.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new O,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:f,slimDOM:d=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S=(()=>!1),maxDepth:k}=e||{};return ct(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===l?{password:!0}:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:v,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1,maxDepth:k})}(document,{mirror:bs,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:j,maskTextFn:m,maskInputFn:p,slimDOM:P,dataURLOptions:L,recordCanvas:C,inlineImages:_,onSerialize:t=>{cn(t,bs)&&V.addIframe(t),fn(t,bs)&&G.trackLinkElement(t),dn(t)&&J.addShadowRoot(Zi.shadowRoot(t),document)},onIframeLoad:(t,e)=>{V.attachIframe(t,e),J.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{G.attachLinkElement(t,e)},keepIframeSrcFn:E});if(!e)return console.warn("Failed to snapshot the document");as({type:wn.FullSnapshot,data:{node:e,initialOffset:rn(window)}},t),Fn.forEach((t=>t.unlock())),I&&V.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,bs.getId(document))}};try{var X=[],K=t=>{var e;return Ln(Hn)({mutationCb:z,mousemoveCb:(t,e)=>as({type:wn.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.MouseInteraction},t)}),scrollCb:q,viewportResizeCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.ViewportResize},t)}),inputCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Input},t)}),mediaInteractionCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.MediaInteraction},t)}),styleSheetRuleCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.StyleSheetRule},t)}),styleDeclarationCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.StyleDeclaration},t)}),canvasMutationCb:H,fontCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Font},t)}),selectionCb:t=>{as({type:wn.IncrementalSnapshot,data:r({source:yn.Selection},t)})},customElementCb:t=>{as({type:wn.IncrementalSnapshot,data:r({source:yn.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:j,inlineStylesheet:c,sampling:y,recordDOM:k,recordCanvas:C,inlineImages:_,userTriggeredOnInput:x,collectFonts:R,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:P,dataURLOptions:L,mirror:bs,iframeManager:V,stylesheetManager:G,shadowDomManager:J,processedNodeManager:Z,canvasManager:us,ignoreCSSAttributes:A,plugins:(null==(e=null==T?void 0:T.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>as({type:wn.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},g)};V.addLoadListener((t=>{try{X.push(K(t.contentDocument))}catch(t){console.warn(t)}}));var Q=()=>{hs(),X.push(K(document)),ms=!0};return"interactive"===document.readyState||"complete"===document.readyState?Q():(X.push(Ji("DOMContentLoaded",(()=>{as({type:wn.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&Q()}))),X.push(Ji("load",(()=>{as({type:wn.Load,data:{}}),"load"===M&&Q()}),window))),()=>{X.forEach((t=>t())),Z.destroy(),V.removeLoadListener(),V.destroy(),bs.reset(),ms=!1,Rn=void 0}}catch(t){console.warn(t)}}Ss.addCustomEvent=(t,e)=>{if(!ms)throw new Error("please add custom event after start recording");as({type:wn.Custom,data:{tag:t,payload:e}})},Ss.freezePage=()=>{Fn.forEach((t=>t.freeze()))},Ss.takeFullSnapshot=t=>{if(!ms)throw new Error("please take full snapshot after start recording");hs(t)},Ss.mirror=bs,(ys=ws||(ws={}))[ys.NotStarted=0]="NotStarted",ys[ys.Running=1]="Running",ys[ys.Stopped=2]="Stopped";var{addCustomEvent:ks}=Ss,{freezePage:Cs}=Ss,{takeFullSnapshot:Is}=Ss,Ms=Object.defineProperty,xs=(t,e,r)=>((t,e,r)=>e in t?Ms(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);class Rs{constructor(t){xs(this,"fileName"),xs(this,"functionName"),xs(this,"lineNumber"),xs(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var _s=/(^|@)\S+:\d+/,Os=/^\s*at .*(\S+:\d+|\(native\))/m,Ts=/^(eval@)?(\[native code])?$/,Es={parse:function(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(Os)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):[]:[]},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter((function(t){return!!t.match(Os)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=e.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(e=r?e.replace(r[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),s=i.join(" ")||void 0,o=["eval",""].indexOf(n[0])>-1?void 0:n[0];return new Rs({functionName:s,fileName:o,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(t){return!t.match(Ts)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new Rs({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(e),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(t.replace(e,""));return new Rs({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],n=2,s=r.length;n/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Rs({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function As(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var r=t.localName;if(!r)break;r=r.toLowerCase();var i=t.parentElement,n=[];if(i.children&&i.children.length>0)for(var s=0;s1&&(r+=":eq("+n.indexOf(t)+")"),e=r+(e?">"+e:""),t=i}return e}function Bs(t){return Array.isArray(t)}function Ls(t){return"object"==typeof t&&null!==t&&!Bs(t)}function Fs(t,e){if(0===e)return!0;var r=Object.keys(t);for(var i of r)if(Ls(t[i])&&Fs(t[i],e-1))return!0;return!1}function Ns(t,e){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);var i=[],n=[];return JSON.stringify(t,(function(t,e){if(i.length>0){var s=i.indexOf(this);~s?i.splice(s+1):i.push(this),~s?n.splice(s,1/0,t):n.push(t),~i.indexOf(e)&&(e=i[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(e)).join(".")+"]")}else i.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(function(t){if(Ls(t)&&Object.keys(t).length>r.numOfKeysLimit)return!0;if("function"==typeof t)return!0;if(Ls(t)&&Fs(t,r.depthOfLimit))return!0;return!1}(e))return function(t){var e=t.toString();r.stringLengthLimit&&e.length>r.stringLengthLimit&&(e=e.slice(0,r.stringLengthLimit)+"...");return e}(e);if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var o={};for(var a in e){var h=e[a];Bs(h)?o[a]=As(h.length?h[0]:null):o[a]=h}return o}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e}))}var Ds={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function js(t,e,r){var i,n=r?Object.assign({},Ds,r):Ds,s=n.logger;if(!s)return()=>{};i="string"==typeof s?e[s]:s;var o=0,a=!1,h=[];if(n.level.includes("error")){var u=e=>{var r=e.message,i=e.error,s=Es.parse(i).map((t=>t.toString())),o=[Ns(r,n.stringifyOptions)];t({level:"error",trace:s,payload:o})};e.addEventListener("error",u),h.push((()=>{e.removeEventListener("error",u)}));var l=e=>{var r,i;e.reason instanceof Error?i=[Ns("Uncaught (in promise) "+(r=e.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[Ns("Uncaught (in promise)",n.stringifyOptions),Ns(e.reason,n.stringifyOptions)]);var s=Es.parse(r).map((t=>t.toString()));t({level:"error",trace:s,payload:i})};e.addEventListener("unhandledrejection",l),h.push((()=>{e.removeEventListener("unhandledrejection",l)}))}for(var c of n.level)h.push(f(i,c));return()=>{h.forEach((t=>t()))};function f(e,r){var i=this;return e[r]?function(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}(e,r,(e=>function(){for(var s=arguments.length,h=new Array(s),u=0;ut.toString())).splice(1),c=("assert"===r?h.slice(1):h).map((t=>Ns(t,n.stringifyOptions)));++o{}}}var Ps="undefined"!=typeof window?window:void 0,Us="undefined"!=typeof globalThis?globalThis:Ps;"undefined"==typeof self&&(Us.self=Us),"undefined"==typeof File&&(Us.File=function(){});var Ws=Array.prototype.forEach,$s=null==Us?void 0:Us.navigator,zs=null==Us?void 0:Us.document;null==Us||Us.location,null==Us||Us.fetch,null!=Us&&Us.XMLHttpRequest&&"withCredentials"in new Us.XMLHttpRequest&&Us.XMLHttpRequest,null==Us||Us.AbortController,null==$s||$s.userAgent;var qs=null!=Ps?Ps:{},Hs=function(t){return t.trim()},Gs=Array.isArray,Vs=Object.prototype,Ys=Vs.hasOwnProperty,Zs=Vs.toString,Js=Gs||function(t){return"[object Array]"===Zs.call(t)},Xs=t=>"function"==typeof t,Ks=t=>t===Object(t)&&!Js(t),Qs=t=>void 0===t,to=t=>"[object String]"==Zs.call(t),eo=t=>null===t,ro=t=>Qs(t)||eo(t),io=t=>"[object Number]"==Zs.call(t)&&t==t,no=t=>"[object Boolean]"===Zs.call(t),so=t=>t instanceof FormData;function oo(t,e,r,i,n){return e>r&&(i.warn("min cannot be greater than max."),e=r),io(t)?t>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):t0){var n=i*this.u;t.tokens=Math.min(t.tokens+n,this.o),t.lastAccess=t.lastAccess+i*this.v}}consumeRateLimit(t){var e,r=Date.now(),i=String(t),n=this.t[i];return n?this.m(n,r):(n={tokens:this.o,lastAccess:r},this.t[i]=n),0===n.tokens||(n.tokens--,0===n.tokens&&(null==(e=this.i)||e.call(this,t)),0===n.tokens)}stop(){this.t={}}}var ho=t=>t instanceof Document,uo={LIB_VERSION:"1.363.1",LIB_NAME:"web"},lo=function(t,e){var{debugEnabled:r}=void 0===e?{}:e,i={S:function(e){if(Ps&&(qs.POSTHOG_DEBUG||r)&&!Qs(Ps.console)&&Ps.console){for(var i=("__rrweb_original__"in Ps.console[e]?Ps.console[e].__rrweb_original__:Ps.console[e]),n=arguments.length,s=new Array(n>1?n-1:0),o=1;o{i.error("You must initialize PostHog before calling "+t)},createLogger:(e,r)=>lo(t+" "+e,r)};return i},co=lo("[PostHog.js]"),fo=co.createLogger,vo={};function po(t,e,r){if(!ro(t)){if(Js(t))return function(t,e,r){if(Js(t))if(Ws&&t.forEach===Ws)t.forEach(e,r);else if("length"in t&&t.length===+t.length)for(var i=0,n=t.length;i{var e=null==zs?void 0:zs.createElement("a");return Qs(e)?null:(e.href=t,e)},yo=function(t,e){var r,i;void 0===e&&(e="&");var n=[];return po(t,(function(t,e){Qs(t)||Qs(e)||"undefined"===e||(r=encodeURIComponent((t=>t instanceof File)(t)?t.name:t.toString()),i=encodeURIComponent(e),n[n.length]=i+"="+r)})),n.join(e)};function bo(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return Xs(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}function So(t,e){var r,i=function(t){try{return"string"==typeof t?new URL(t).hostname:"url"in t?new URL(t.url).hostname:t.hostname}catch(t){return null}}(t),n={hostname:i,isHostDenied:!1};if(null==(r=e.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var s of e.payloadHostDenyList)if(i.endsWith(s))return{hostname:i,isHostDenied:!0};return n}var ko="$session_recording_remote_config",Co="$session_is_sampled",Io="$session_past_minimum_duration",Mo="$session_recording_url_trigger_activated_session",xo="$session_recording_event_trigger_activated_session",Ro="$debug_first_full_snapshot_timestamp",_o=new RegExp("(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})"),Oo=new RegExp("(\\d{3}-?\\d{2}-?\\d{4})");var To="[SessionRecording]",Eo="redacted",Ao={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Bo=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],Lo=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],Fo=["/s/","/e/","/i/"];function No(t,e,r,i){if(ro(t))return t;var n=(null==e?void 0:e["content-length"])||function(t){return new Blob([t]).size}(t);return to(n)&&(n=parseInt(n)),n>r?To+" "+i+" body too large to record ("+n+" bytes)":t}function Do(t,e){if(ro(t))return t;var r=t;return function(t,e){if(ro(t))return!1;if(to(t)){if(t=Hs(t),_o.test((t||"").replace(/[- ]/g,"")))return!1;if(Oo.test(t))return!1}return!0}(r)||(r=To+" "+e+" body "+Eo),po(Lo,(t=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(t))&&(r=To+" "+e+" body "+Eo+" as might contain: "+t)})),r}var jo=(t,e)=>{var i,n,s,o={payloadSizeLimitBytes:Ao.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Ao.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...Ao.payloadHostDenyList]},a=!1!==t.session_recording.recordHeaders&&e.recordHeaders,h=!1!==t.session_recording.recordBody&&e.recordBody,u=!1!==t.capture_performance&&e.recordPerformance,l=(i=o,s=Math.min(1e6,null!==(n=i.payloadSizeLimitBytes)&&void 0!==n?n:1e6),t=>(null!=t&&t.requestBody&&(t.requestBody=No(t.requestBody,t.requestHeaders,s,"Request")),null!=t&&t.responseBody&&(t.responseBody=No(t.responseBody,t.responseHeaders,s,"Response")),t)),c=e=>{return l(((t,e)=>{var r,i=wo(t.name),n=0===e.indexOf("http")?null==(r=wo(e))?void 0:r.pathname:e;"/"===n&&(n="");var s=null==i?void 0:i.pathname.replace(n||"","");if(!(i&&s&&Fo.some((t=>0===s.indexOf(t)))))return t})((i=(r=e).requestHeaders,ro(i)||po(Object.keys(null!=i?i:{}),(t=>{Bo.includes(t.toLowerCase())&&(i[t]=Eo)})),r),t.api_host));var r,i},f=Xs(t.session_recording.maskNetworkRequestFn);return f&&Xs(t.session_recording.maskCapturedNetworkRequestFn)&&co.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),f&&(t.session_recording.maskCapturedNetworkRequestFn=e=>{var i=t.session_recording.maskNetworkRequestFn({url:e.name});return r({},e,{name:null==i?void 0:i.url})}),o.maskRequestFn=Xs(t.session_recording.maskCapturedNetworkRequestFn)?e=>{var r,i=c(e);return i&&null!==(r=null==t.session_recording.maskCapturedNetworkRequestFn?void 0:t.session_recording.maskCapturedNetworkRequestFn(i))&&void 0!==r?r:void 0}:t=>function(t){if(!Qs(t))return t.requestBody=Do(t.requestBody,"Request"),t.responseBody=Do(t.responseBody,"Response"),t}(c(t)),r({},Ao,o,{recordHeaders:a,recordBody:h,recordPerformance:u,recordInitialRequests:u})},Po=fo("[Recorder]"),Uo=t=>"navigation"===t.entryType,Wo=t=>"resource"===t.entryType;function $o(t,e,r){if(r.recordInitialRequests){var i=e.performance.getEntries().filter((t=>Uo(t)||Wo(t)&&r.initiatorTypes.includes(t.initiatorType)));t({requests:i.flatMap((t=>Zo({entry:t,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new e.PerformanceObserver((e=>{var i=e.getEntries().filter((t=>Uo(t)||Wo(t)&&r.initiatorTypes.includes(t.initiatorType)&&(t=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==t.initiatorType&&"fetch"!==t.initiatorType)(t)));t({requests:i.flatMap((t=>Zo({entry:t,method:void 0,status:void 0,networkRequest:{}})))})})),s=PerformanceObserver.supportedEntryTypes.filter((t=>r.performanceEntryTypeToObserve.includes(t)));return n.observe({entryTypes:s}),()=>{n.disconnect()}}function zo(t,e){return!!e&&(no(e)||e[t])}function qo(t){var{type:e,recordBody:r,headers:i,url:n}=t;function s(t){var e=Object.keys(i).find((t=>"content-type"===t.toLowerCase())),r=e&&i[e];return t.some((t=>null==r?void 0:r.includes(t)))}if(!r)return!1;if(function t(e){try{return"string"==typeof e?e.startsWith("blob:"):e instanceof URL?"blob:"===e.protocol:e instanceof Request&&t(e.url)}catch(t){return!1}}(n))return!1;if(no(r))return!0;if(Js(r))return s(r);var o=r[e];return no(o)?o:s(o)}function Ho(t,e,r,i,n,s){return Go.apply(this,arguments)}function Go(){return Go=e((function*(t,e,r,i,n,s){if(void 0===s&&(s=0),s>10)return Po.warn("Failed to get performance entry for request",{url:r,initiatorType:e}),null;var o=function(t,e){for(var r=t.length-1;r>=0;r-=1)if(e(t[r]))return t[r]}(t.performance.getEntriesByName(r),(t=>Wo(t)&&t.initiatorType===e&&(Qs(i)||t.startTime>=i)&&(Qs(n)||t.startTime<=n)));return o||(yield new Promise((t=>setTimeout(t,50*s))),Ho(t,e,r,i,n,s+1))})),Go.apply(this,arguments)}function Vo(t){var{body:e,options:r,url:i}=t;if(ro(e))return null;var{hostname:n,isHostDenied:s}=So(i,r);if(s)return n+" is in deny list";if(to(e))return e;if(ho(e))return e.textContent;if(so(e))return yo(e);if(Ks(e))try{return JSON.stringify(e)}catch(t){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}var Yo=t=>!eo(t)&&("navigation"===t.entryType||"resource"===t.entryType);function Zo(t){var{entry:e,method:i,status:n,networkRequest:s,isInitial:o,start:a,end:h,url:u,initiatorType:l}=t;a=e?e.startTime:a,h=e?e.responseEnd:h;var c=Math.floor(Date.now()-performance.now()),f=Math.floor(c+(a||0)),d=[r({},e?e.toJSON():{name:u},{startTime:Qs(a)?void 0:Math.round(a),endTime:Qs(h)?void 0:Math.round(h),timeOrigin:c,timestamp:f,method:i,initiatorType:l||(e?e.initiatorType:void 0),status:n,requestHeaders:s.requestHeaders,requestBody:s.requestBody,responseHeaders:s.responseHeaders,responseBody:s.responseBody,isInitial:o})];if(Yo(e))for(var v of e.serverTiming||[])d.push({timeOrigin:c,timestamp:f,startTime:Math.round(e.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return d}var Jo=["video/","audio/"];function Xo(t){return new Promise((e=>{var r=setTimeout((()=>e("[SessionReplay] Timeout while trying to read body")),500);try{t.clone().text().then((t=>e(t)),(t=>e("[SessionReplay] Failed to read body: "+t))).finally((()=>clearTimeout(r)))}catch(t){clearTimeout(r),e("[SessionReplay] Failed to read body")}}))}function Ko(){return(Ko=e((function*(t){var{r:e,options:r,url:i}=t,{hostname:n,isHostDenied:s}=So(i,r);return s?Promise.resolve(n+" is in deny list"):Xo(e)}))).apply(this,arguments)}function Qo(){return(Qo=e((function*(t){var{r:e,options:r,url:i}=t,n=function(t){var e,{r:r,options:i,url:n}=t;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var s=null==(e=r.headers.get("Content-Type"))?void 0:e.toLowerCase(),o=Jo.some((t=>null==s?void 0:s.startsWith(t)));if(s&&o)return"Content-Type "+s+" is not supported";var{hostname:a,isHostDenied:h}=So(n,i);return h?a+" is in deny list":null}({r:e,options:r,url:i});return eo(n)?Xo(e):Promise.resolve(n)}))).apply(this,arguments)}function ta(t,r,i){if(!i.initiatorTypes.includes("fetch"))return()=>{};var n=zo("request",i.recordHeaders),s=zo("response",i.recordHeaders),o=bo(r,"fetch",(o=>function(){var a=e((function*(e,a){var h,u,l,c=new Request(e,a),f={};try{var d={};c.headers.forEach(((t,e)=>{d[e]=t})),n&&(f.requestHeaders=d),qo({type:"request",headers:d,url:e,recordBody:i.recordBody})&&(f.requestBody=yield function(t){return Ko.apply(this,arguments)}({r:c,options:i,url:e})),u=r.performance.now(),h=yield o(c),l=r.performance.now();var v={};return h.headers.forEach(((t,e)=>{v[e]=t})),s&&(f.responseHeaders=v),qo({type:"response",headers:v,url:e,recordBody:i.recordBody})&&(f.responseBody=yield function(t){return Qo.apply(this,arguments)}({r:h,options:i,url:e})),h}finally{Ho(r,"fetch",c.url,u,l).then((e=>{var r,i=Zo({entry:e,method:c.method,status:null==(r=h)?void 0:r.status,networkRequest:f,start:u,end:l,url:c.url,initiatorType:"fetch"});t({requests:i})})).catch((()=>{}))}}));return function(t,e){return a.apply(this,arguments)}}()));return()=>{o()}}var ea=null;function ra(t,e,i){if(!("performance"in e))return()=>{};if(ea)return Po.warn("Network observer already initialised, doing nothing"),()=>{};var n=i?Object.assign({},Ao,i):Ao,s=e=>{var i=[];e.requests.forEach((t=>{var e=n.maskRequestFn(t);e&&i.push(e)})),i.length>0&&t(r({},e,{requests:i}))},o=$o(s,e,n),a=()=>{},h=()=>{};return(n.recordHeaders||n.recordBody)&&(a=function(t,e,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=zo("request",r.recordHeaders),n=zo("response",r.recordHeaders),s=bo(e.XMLHttpRequest.prototype,"open",(s=>function(o,a,h,u,l){void 0===h&&(h=!0);var c,f,d=this,v=new Request(a),p={},m={},g=d.setRequestHeader.bind(d);d.setRequestHeader=(t,e)=>(m[t]=e,g(t,e)),i&&(p.requestHeaders=m);var w=d.send.bind(d);d.send=t=>(qo({type:"request",headers:m,url:a,recordBody:r.recordBody})&&(p.requestBody=Vo({body:t,options:r,url:a})),c=e.performance.now(),w(t));var y=()=>{d.removeEventListener("readystatechange",b),d.removeEventListener("error",y),d.removeEventListener("abort",y),d.removeEventListener("timeout",y)},b=()=>{if(d.readyState===d.DONE){y(),f=e.performance.now();var i={};d.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{var e=t.split(": "),r=e.shift(),n=e.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),qo({type:"response",headers:i,url:a,recordBody:r.recordBody})&&(p.responseBody=Vo({body:d.response,options:r,url:a})),Ho(e,"xmlhttprequest",v.url,c,f).then((e=>{var r=Zo({entry:e,method:o,status:null==d?void 0:d.status,networkRequest:p,start:c,end:f,url:a.toString(),initiatorType:"xmlhttprequest"});t({requests:r})})).catch((()=>{}))}};d.addEventListener("readystatechange",b),d.addEventListener("error",y),d.addEventListener("abort",y),d.addEventListener("timeout",y),s.call(d,o,a.toString(),h,u,l)}));return()=>{s()}}(s,e,n),h=ta(s,e,n)),ea=()=>{o(),a(),h(),ea=null}}var ia=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}({}),na=function(t){return t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t}({}),sa="disabled",oa="sampled",aa="active",ha="buffering",ua="paused",la="rrweb_error",ca="trigger",fa=ca+"_activated",da=ca+"_pending",va=ca+"_"+sa;function pa(t,e,r){return e.some((e=>{var i;return"regex"===e.matching&&(null!==(i=null==r?void 0:r.get(e.url))&&void 0!==i?i:new RegExp(e.url)).test(t)}))}class ma{constructor(t){this.k=t}triggerStatus(t){var e=this.k.map((e=>e.triggerStatus(t)));return e.includes(fa)?fa:e.includes(da)?da:va}stop(){this.k.forEach((t=>t.stop()))}}class ga{constructor(t){this.k=t}triggerStatus(t){var e=new Set;for(var r of this.k)e.add(r.triggerStatus(t));switch(e.delete(va),e.size){case 0:return va;case 1:return Array.from(e)[0];default:return da}}stop(){this.k.forEach((t=>t.stop()))}}class wa{triggerStatus(){return da}stop(){}}var ya=t=>"sessionRecording"in t;class ba{constructor(t){this.C=[],this.I=[],this.M=new Map,this.R=new Map,this.O="",this.urlBlocked=!1,this._instance=t}onConfig(t){var e,r;this.C=(ya(t)?Ks(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.urlTriggers:[]:null==t?void 0:t.urlTriggers)||[],this.I=(ya(t)?Ks(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.urlBlocklist:[]:null==t?void 0:t.urlBlocklist)||[],this.T()}T(){for(var t of(this.M.clear(),this.R.clear(),this.C))if("regex"===t.matching&&!this.M.has(t.url))try{this.M.set(t.url,new RegExp(t.url))}catch(e){co.error("Invalid URL trigger regex pattern:",t.url,e)}for(var e of this.I)if("regex"===e.matching&&!this.R.has(e.url))try{this.R.set(e.url,new RegExp(e.url))}catch(t){co.error("Invalid URL blocklist regex pattern:",e.url,t)}}onRemoteConfig(t){this.onConfig(t)}A(t){var e;return 0===this.C.length?va:(null==(e=this._instance)?void 0:e.get_property(Mo))===t?fa:da}triggerStatus(t){var e=this.A(t),r=e===fa?fa:e===da?da:va;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(t,e,r,i){if(void 0!==Ps&&Ps.location.href){var n=Ps.location.href;if(n!==this.O){this.O=n;var s=this.urlBlocked,o=pa(n,this.I,this.R);if(!s||!o){o&&!s?t():!o&&s&&e();var a=this.A(i)===fa,h=pa(n,this.C,this.M);!a&&h&&r("url",n)}}}}stop(){this.O=""}}class Sa{constructor(t){this.linkedFlag=null,this.linkedFlagSeen=!1,this.B=()=>{},this._instance=t}triggerStatus(){var t=da;return ro(this.linkedFlag)&&(t=va),this.linkedFlagSeen&&(t=fa),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:t}),t}onConfig(t,e){var r;if(this.linkedFlag=(ya(t)?Ks(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.linkedFlag:null:null==t?void 0:t.linkedFlag)||null,!ro(this.linkedFlag)&&!this.linkedFlagSeen){var i=to(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=to(this.linkedFlag)?null:this.linkedFlag.variant;this.B=this._instance.onFeatureFlags(((t,r)=>{var s=!1;if(Ks(r)&&i in r){var o=r[i];s=no(o)?!0===o:n?o===n:!!o}this.linkedFlagSeen=s,s&&e(i,n)}))}}onRemoteConfig(t,e){this.onConfig(t,e)}stop(){this.B()}}class ka{constructor(t){this.L=[],this._instance=t}onConfig(t){var e;this.L=(ya(t)?Ks(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.eventTriggers:[]:null==t?void 0:t.eventTriggers)||[]}onRemoteConfig(t){this.onConfig(t)}F(t){var e;return 0===this.L.length?va:(null==(e=this._instance)?void 0:e.get_property(xo))===t?fa:da}triggerStatus(t){var e=this.F(t),r=e===fa?fa:e===da?da:va;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}checkEventTriggerConditions(t,e,r){0!==this.L.length&&(!(this.F(r)===fa)&&this.L.includes(t)&&e("event",t))}stop(){}}function Ca(t){return t.rrwebError?la:t.isRecordingEnabled?ha:sa}function Ia(t){if(t.rrwebError)return la;if(!t.receivedFlags)return ha;if(!t.isRecordingEnabled)return sa;if(t.urlTriggerMatching.urlBlocked)return ua;var e=!0===t.isSampled,r=new ma([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?oa:r===fa?aa:r===da?ha:!1===t.isSampled?sa:aa}function Ma(t){if(t.rrwebError)return la;if(!t.receivedFlags)return ha;if(!t.isRecordingEnabled)return sa;if(t.urlTriggerMatching.urlBlocked)return ua;var e=new ga([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),r=e!==va,i=no(t.isSampled);return r&&e===da?ha:r&&e===va||i&&!t.isSampled?sa:!0===t.isSampled?oa:aa}function xa(t){var e,r;return(null==(e=JSON.stringify(t,(r=[],function(t,e){if(Ks(e)){for(;r.length>0&&r[r.length-1]!==this;)r.pop();return r.includes(e)?"[Circular]":(r.push(e),e)}return e})))?void 0:e.length)||0}var Ra=Uint8Array,_a=Uint16Array,Oa=Uint32Array,Ta=new Ra([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ea=new Ra([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Aa=new Ra([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ba=function(t,e){for(var r=new _a(31),i=0;i<31;++i)r[i]=e+=1<>>1|(21845&Pa)<<1;Ua=(61680&(Ua=(52428&Ua)>>>2|(13107&Ua)<<2))>>>4|(3855&Ua)<<4,ja[Pa]=((65280&Ua)>>>8|(255&Ua)<<8)>>>1}var Wa=function(t,e,r){for(var i=t.length,n=0,s=new _a(e);n>>h]=u}else for(o=new _a(i),n=0;n>>15-t[n];return o},$a=new Ra(288);for(Pa=0;Pa<144;++Pa)$a[Pa]=8;for(Pa=144;Pa<256;++Pa)$a[Pa]=9;for(Pa=256;Pa<280;++Pa)$a[Pa]=7;for(Pa=280;Pa<288;++Pa)$a[Pa]=8;var za=new Ra(32);for(Pa=0;Pa<32;++Pa)za[Pa]=5;var qa=Wa($a,9,0),Ha=Wa(za,5,0),Ga=function(t){return(t/8>>0)+(7&t&&1)},Va=function(t,e,r){(null==r||r>t.length)&&(r=t.length);var i=new(t instanceof _a?_a:t instanceof Oa?Oa:Ra)(r-e);return i.set(t.subarray(e,r)),i},Ya=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Za=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Ja=function(t,e){for(var r=[],i=0;if&&(f=s[i].s);var d=new _a(f+1),v=Xa(r[l-1],d,0);if(v>e){i=0;var p=0,m=v-e,g=1<e))break;p+=g-(1<>>=m;p>0;){var y=s[i].s;d[y]=0&&p;--i){var b=s[i].s;d[b]==e&&(--d[b],++p)}v=e}return[new Ra(d),v]},Xa=function(t,e,r){return-1==t.s?Math.max(Xa(t.l,e,r+1),Xa(t.r,e,r+1)):e[t.s]=r},Ka=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new _a(++e),i=0,n=t[0],s=1,o=function(t){r[i++]=t},a=1;a<=e;++a)if(t[a]==n&&a!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=t[a]}return[r.subarray(0,i),e]},Qa=function(t,e){for(var r=0,i=0;i>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s4&&!x[Aa[_-1]];--_);var O,T,E,A,B=u+5<<3,L=Qa(n,$a)+Qa(s,za)+o,F=Qa(n,f)+Qa(s,p)+o+14+3*_+Qa(C,x)+(2*C[16]+3*C[17]+7*C[18]);if(B<=L&&B<=F)return th(e,l,t.subarray(h,h+u));if(Ya(e,l,1+(F15&&(Ya(e,l,P[I]>>>5&127),l+=P[I]>>>12)}}}else O=qa,T=$a,E=Ha,A=za;for(I=0;I255){U=i[I]>>>18&31;Za(e,l,O[U+257]),l+=T[U+257],U>7&&(Ya(e,l,i[I]>>>23&31),l+=Ta[U]);var W=31&i[I];Za(e,l,E[W]),l+=A[W],W>3&&(Za(e,l,i[I]>>>5&8191),l+=Ea[W])}else Za(e,l,O[i[I]]),l+=T[i[I]];return Za(e,l,O[256]),l+T[256]},rh=new Oa([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ih=function(){for(var t=new Oa(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),nh=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i>>8;t=r},d:function(){return 4294967295^t}}},sh=function(t,e,r,i,n){return function(t,e,r,i,n,s){var o=t.length,a=new Ra(i+o+5*(1+Math.floor(o/7e3))+n),h=a.subarray(i,a.length-n),u=0;if(!e||o<8)for(var l=0;l<=o;l+=65535){var c=l+65535;c>>13,v=8191&f,p=(1<7e3||x>24576)&&A>423){u=eh(t,h,0,S,k,C,M,x,_,l-_,u),x=I=M=0,_=l;for(var B=0;B<286;++B)k[B]=0;for(B=0;B<30;++B)C[B]=0}var L=2,F=0,N=v,D=T-E&32767;if(A>2&&O==b(l-D))for(var j=Math.min(d,A)-1,P=Math.min(32767,l),U=Math.min(258,A);D<=P&&--N&&T!=E;){if(t[l+L]==t[l+L-D]){for(var W=0;WL){if(L=W,F=D,W>j)break;var z=Math.min(D,W-2),q=0;for(B=0;Bq&&(q=G,E=H)}}}D+=(T=E)-(E=m[T])+32768&32767}if(F){S[x++]=268435456|Na[L]<<18|Da[F];var V=31&Na[L],Y=31&Da[F];M+=Ta[V]+Ea[Y],++k[257+V],++C[Y],R=l+L,++I}else S[x++]=t[l],++k[t[l]]}}u=eh(t,h,s,S,k,C,M,x,_,l-_,u)}return Va(a,0,i+Ga(u)+n)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!0)},oh=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},ah=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&oh(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},hh=function(t){return 10+(t.filename&&t.filename.length+1||0)};class uh{constructor(t,e){var r,i;void 0===e&&(e={}),this.N={},this.D=t=>{if(!this.N[t]){var e,r;this.N[t]=!0;var i=this.j(t);null==(e=(r=this.P).onBlockedNode)||e.call(r,t,i)}},this.U=t=>{var e=this.j(t);if("svg"!==(null==e?void 0:e.nodeName)&&e instanceof Element){var r=e.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[t,e]},this.j=t=>this._rrweb.mirror.getNode(t),this.W=t=>{var e,r,i,n,s,o,a,h;return(null!==(e=null==(r=t.removes)?void 0:r.length)&&void 0!==e?e:0)+(null!==(i=null==(n=t.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(s=null==(o=t.texts)?void 0:o.length)&&void 0!==s?s:0)+(null!==(a=null==(h=t.adds)?void 0:h.length)&&void 0!==a?a:0)},this.throttleMutations=t=>{if(3!==t.type||0!==t.data.source)return t;var e=t.data,r=this.W(e);e.attributes&&(e.attributes=e.attributes.filter((t=>{var[e]=this.U(t.id);return!this.$.consumeRateLimit(e)&&t})));var i=this.W(e);return 0!==i||r===i?t:void 0},this._rrweb=t,this.P=e,this.$=new ao({bucketSize:null!==(r=this.P.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.P.refillRate)&&void 0!==i?i:10,refillInterval:1e3,i:this.D,h:co})}reset(){this.N={}}stop(){this.$.stop(),this.reset()}}function lh(t,e){return function(t){for(var e=0,r=0;r({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function bh(){var t;return null==qs||null==(t=qs.__PosthogExtensions__)?void 0:t.rrweb}function Sh(){var t;return null==(t=bh())?void 0:t.record}function kh(t){return function(t,e){for(var r="",i=0;i>>1)),n=0,s=function(t){i[n++]=t},o=0;oi.length){var a=new Ra(n+8+(r-o<<1));a.set(i),i=a}var h=t.charCodeAt(o);h<128||e?s(h):h<2048?(s(192|h>>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++o))>>>18),s(128|h>>>12&63),s(128|h>>>6&63),s(128|63&h)):(s(224|h>>>12),s(128|h>>>6&63),s(128|63&h))}return Va(i,0,n)}(JSON.stringify(t))))}function Ch(t,e){return t.type===ia.Custom&&t.data.tag===e}function Ih(t){return Ch(t,"sessionIdle")}function Mh(t){return Ch(t,"$session_ending")}function xh(t){return Ch(t,"$session_starting")}function Rh(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var r=Math.floor(t.data.length/2),i=t.sizes.slice(0,r),n=t.sizes.slice(r);return[Rh({size:i.reduce(((t,e)=>t+e),0),data:t.data.slice(0,r),sizes:i,sessionId:t.sessionId,windowId:t.windowId}),Rh({size:n.reduce(((t,e)=>t+e),0),data:t.data.slice(r),sizes:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap((t=>t))}return[t]}class _h{get sessionId(){return this.G}get V(){if(!this._instance.sessionManager)throw new Error(mh+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Y(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get Z(){var t=this._instance.get_property(Co);return!0===t?null:!1!==t&&(to(t)?t===this.sessionId:null)}get J(){var t,e=null==(t=this.X)?void 0:t.sampleRate;return io(e)?e:null}get K(){var t,e=null==(t=this.X)?void 0:t.minimumDurationMilliseconds;return io(e)?e:null}constructor(t){this.tt="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.et=void 0,this.rt=Date.now(),this.it=!1,this.nt=[],this.st="unknown",this.ot=!1,this.ht=!1,this.ut=new wa,this.lt=[],this.ct=void 0,this.ft=void 0,this.dt=Ca,this.vt=void 0,this.gt=void 0,this.wt=void 0,this.yt=void 0,this.bt=(t,e,r)=>{var i,n;if(r&&(t!==this.G||e!==this.St)){var s,o=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),a=this.G,h=this.St;if(o)this.kt("$session_ending",{currentSessionId:a,currentWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt,flushed_size:null==(s=this.Ct)?void 0:s.currentTrackedSize});this.Ct&&this.Ct.reset(),null==(i=this._instance.persistence)||i.unregister(Ro),this.ht=!1,null==(n=bh())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.kt("$session_id_change",{sessionId:t,windowId:e,changeReason:r}),this.It(),!0===this.st&&(this.st="unknown",this.stop(),this.start("session_id_changed")),o&&this.kt("$session_starting",{previousSessionId:a,previousWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt}),io(this.J)&&ro(this.wt)&&this.Mt(t)}},this.xt=()=>{var t;return(null==(t=this._instance.persistence)?void 0:t.props[Io])===this.G},this.Rt=()=>{var t,e;if(0===this._t.data.length)return null;var r=null==(t=this._t.data[0])?void 0:t.timestamp,i=null==(e=this._t.data[this._t.data.length-1])?void 0:e.timestamp;return io(r)&&io(i)?i-r:null},this.Ot=()=>{var t,e,r=this.K;if(!io(r))return!1;if(!(null!==(t=null==(e=this._instance.config.session_recording)?void 0:e.strictMinimumDuration)&&void 0!==t&&t)){var i=this.Tt;return io(i)&&i>=0&&i=r)||(null==(n=this._instance.persistence)||n.register({[Io]:this.G}),!1))},this.Et=()=>{this.status!==ha?this.At():this.Bt()},this.Lt=()=>{this.kt("browser offline",{})},this.Ft=()=>{this.kt("browser online",{})},this.Nt=()=>{if(null!=zs&&zs.visibilityState){var t="window "+zs.visibilityState;this.kt(t,{})}},this._instance=t;var{sessionId:e,windowId:r}=this.V.checkAndGetSessionAndWindowId();this.G=e,this.St=r,this.Dt=new Sa(this._instance),this.jt=new ba(this._instance),this.Pt=new ka(this._instance),this._t=this.Bt(),this.Y>=this.V.sessionTimeoutMs&&gh.warn("session_idle_threshold_ms ("+this.Y+") is greater than the session timeout ("+this.V.sessionTimeoutMs+"). Session will never be detected as idle"),this.Ct=new fh(this._instance)}get Ut(){var t,e,r,i,n,s,o,a=null==(t=this.X)?void 0:t.masking,h={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},u=null!==(n=null==h?void 0:h.maskAllInputs)&&void 0!==n?n:null==a?void 0:a.maskAllInputs,l=null!==(s=null==h?void 0:h.maskTextSelector)&&void 0!==s?s:null==a?void 0:a.maskTextSelector,c=null!==(o=null==h?void 0:h.blockSelector)&&void 0!==o?o:null==a?void 0:a.blockSelector;return Qs(u)&&Qs(l)&&Qs(c)?void 0:{maskAllInputs:null==u||u,maskTextSelector:l,blockSelector:c}}get Wt(){var t,e,r,i,n,s,o,a=this._instance.config.session_recording.captureCanvas,h=null==(t=this.X)?void 0:t.canvasRecording,u=null!==(e=null!==(r=null==a?void 0:a.recordCanvas)&&void 0!==r?r:null==h?void 0:h.enabled)&&void 0!==e&&e,l=null!==(i=null!==(n=null==a?void 0:a.canvasFps)&&void 0!==n?n:null==h?void 0:h.fps)&&void 0!==i?i:4,c=null!==(s=null!==(o=null==a?void 0:a.canvasQuality)&&void 0!==o?o:null==h?void 0:h.quality)&&void 0!==s?s:.4;if("string"==typeof c){var f=parseFloat(c);c=isNaN(f)?.4:f}return{enabled:u,fps:oo(l,0,12,fo("canvas recording fps"),4),quality:oo(c,0,1,fo("canvas recording quality"),.4)}}get $t(){var t,e=!(null==(t=this.X)||!t.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:e}get zt(){var t,e,r,i=null==(t=this.X)?void 0:t.networkPayloadCapture,n={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},s=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),o=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),a=ph(this._instance.config.capture_performance),h=ph(null==i?void 0:i.capturePerformance),u=!!(no(a)?a:h);return s||o||u?{recordHeaders:s,recordBody:o,recordPerformance:u}:void 0}qt(){var t,e,r=[],i=null==(t=qs.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordConsolePlugin;i&&this.$t&&r.push(i());var n=null==(e=qs.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordNetworkPlugin;this.zt&&Xs(n)&&(!go.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(n(jo(this._instance.config,this.zt))):gh.info("NetworkCapture not started because we are on localhost."));return r}Ht(t){var e=this._instance.config.session_recording;if(e.maskCapturedNetworkRequestFn){var r,i=e.maskCapturedNetworkRequestFn({name:t});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(e.maskNetworkRequestFn){var n=e.maskNetworkRequestFn({url:t});return null==n?void 0:n.url}return t}Gt(t){try{return t.rrwebMethod(),!0}catch(e){return this.nt.length<10?this.nt.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):gh.warn("could not emit queued rrweb event.",e,t),!1}}kt(t,e){return this.Gt(yh((()=>Sh().addCustomEvent(t,e))))}Vt(){try{if(this._instance.config.capture_pageview||!Ps)return;var t=new URL(Ps.location.href),e=t.origin+t.pathname+t.search,r=this.Ht(e);this.Yt!==r&&(this.Yt=r,this.kt("$url_changed",{href:r}))}catch(t){}}Zt(){if(this.nt.length){var t=[...this.nt];this.nt=[],t.forEach((t=>{Date.now()-t.enqueuedAt<=2e3&&this.Gt(t)}))}}Jt(){return this.Gt(yh((()=>Sh().takeFullSnapshot())))}get Xt(){var t,e;return this.ut.triggerStatus(this.sessionId)!==da||["sampled","active"].includes(this.status)?null!==(t=null==(e=this._instance.config.session_recording)?void 0:e.full_snapshot_interval_millis)&&void 0!==t?t:vh:dh}Kt(){if(this.Qt&&clearInterval(this.Qt),!0!==this.st){var t=this.Xt;t&&(this.Qt=setInterval((()=>{this.Jt()}),t))}}te(){this.jt.urlBlocked||(this.jt.urlBlocked=!0,clearInterval(this.Qt),gh.info("recording paused due to URL blocker"),this.kt("recording paused",{reason:"url blocker"}))}ee(){this.jt.urlBlocked&&(this.jt.urlBlocked=!1,this.Jt(),this.Kt(),this.kt("recording resumed",{reason:"left blocked url"}),gh.info("recording resumed"))}re(t,e){if(!this.it&&this.ut.triggerStatus(this.sessionId)===da){this.it=!0;try{var r;null==(r=this._instance)||null==(r=r.persistence)||r.register({["url"===t?Mo:xo]:this.G}),this.At(),this.ie(t+"_trigger_matched",{["url"===t?"matchedUrl":"matchedEvent"]:e})}finally{this.it=!1}}}get isStarted(){return!!this.et}get X(){var t=this._instance.get_property(ko);if(t){var e=Ks(t)?t:JSON.parse(t);if(!this.isStarted){var r,i,n=null!==(r=e.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>36e5)return gh.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:t}),void(null==(i=this._instance.persistence)||i.unregister(ko))}return e}}ne(t,e){var r;this._instance.get_property(t)&&(e(),null==(r=this._instance.persistence)||r.unregister(t))}start(t){var e,r,i=this.X;if(i){var{sessionId:n,windowId:s}=this.V.checkAndGetSessionAndWindowId();this.G=n,this.St=s,null==(e=this._instance.persistence)||e.unregister(Ro),null!=i&&i.endpoint&&(this.tt=null==i?void 0:i.endpoint),"any"===(null==i?void 0:i.triggerMatchType)?(this.dt=Ia,this.ut=new ma([this.Pt,this.jt])):(this.dt=Ma,this.ut=new ga([this.Pt,this.jt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:null==i?void 0:i.triggerMatchType}),this.jt.onConfig(i),this.Pt.onConfig(i),null==(r=this.ft)||r.call(this),this.se(),this.Dt.onConfig(i,((t,e)=>{this.ie("linked_flag_matched",{flag:t,variant:e})})),this.ne("$replay_override_sampling",(()=>{this.overrideSampling()})),this.ne("$replay_override_linked_flag",(()=>{this.overrideLinkedFlag()})),this.ne("$replay_override_event_trigger",(()=>{this.overrideTrigger("event")})),this.ne("$replay_override_url_trigger",(()=>{this.overrideTrigger("url")})),this.Mt(this.sessionId),this.oe(),this.ot||(mo(Ps,"beforeunload",this.Et),mo(Ps,"offline",this.Lt),mo(Ps,"online",this.Ft),mo(Ps,"visibilitychange",this.Nt),this.vt||(this.vt=this.V.onSessionId(this.bt)),this.gt||(this.gt=this.V.on("forcedIdleReset",(()=>{this.It(),this.st="unknown",this.stop(),this.yt=this.V.onSessionId(((t,e,r)=>{var i;null==(i=this.yt)||i.call(this),this.yt=void 0,this.bt(t,e,r)}))}))),ro(this.ct)&&(this.ct=this._instance.on("eventCaptured",(t=>{try{if("$pageview"===t.event){var e=null!=t&&t.properties.$current_url?this.Ht(null==t?void 0:t.properties.$current_url):"";if(!e)return;this.kt("$pageview",{href:e})}}catch(t){gh.error("Could not add $pageview to rrweb session",t)}}))),this.status===aa&&this.ie(t||"recording_initialized"))}else gh.info("remote config must be stored in persistence before recording can start")}ae(){var t,e,r,i,n,s,o,a;null==Ps||Ps.removeEventListener("beforeunload",this.Et),null==Ps||Ps.removeEventListener("offline",this.Lt),null==Ps||Ps.removeEventListener("online",this.Ft),null==Ps||Ps.removeEventListener("visibilitychange",this.Nt),clearInterval(this.Qt),this.he(),null==(t=this.ct)||t.call(this),this.ct=void 0,null==(e=this.ft)||e.call(this),this.ft=void 0,null==(r=this.vt)||r.call(this),this.vt=void 0,null==(i=this.gt)||i.call(this),this.gt=void 0,null==(n=this.wt)||n.call(this),this.wt=void 0,null==(s=this.yt)||s.call(this),this.yt=void 0,this.Pt.stop(),this.jt.stop(),this.Dt.stop(),null==(o=this.ue)||o.stop(),this.nt=[],null==(a=this.et)||a.call(this),this.et=void 0}stop(){this.At(),this.Bt(),this.ae(),gh.info("stopped")}discard(){this.Bt(),this.ae(),gh.info("discarded")}onRRwebEmit(t){var e,i,n,s,o,a;if(this.Zt(),t&&Ks(t)){if(t.type===ia.Meta){var h=this.Ht(t.data.href);if(this.Yt=h,!h)return;t.data.href=h}else this.Vt();if(this.jt.checkUrlTriggerConditions((()=>this.te()),(()=>this.ee()),((t,e)=>this.re(t,e)),this.sessionId),!this.jt.urlBlocked||(u=t).type===ia.Custom&&"recording paused"===u.data.tag){var u,l,c;if(t.type===ia.FullSnapshot)this.Kt(),null==(l=this.ue)||l.reset(),null==(c=this._instance.persistence)||c.register_once({[Ro]:t.timestamp},void 0);t.type===ia.FullSnapshot&&this.ut.triggerStatus(this.sessionId)===da&&this.le();var f=this.ue?this.ue.throttleMutations(t):t;if(f){var d=function(t){var e=t;if(e&&Ks(e)&&6===e.type&&Ks(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;i2e3?r.push(e.data.payload.payload[i].slice(0,2e3)+"...[truncated]"):r.push(e.data.payload.payload[i]);return e.data.payload.payload=r,t}return t}(f),v=function(t){return Mh(t)?t.data.payload:null}(d),p=function(t){return xh(t)?t.data.payload:null}(d);if(v||p){var m=null!=v?v:p;null!=m&&m.lastActivityTimestamp&&(d.timestamp=m.lastActivityTimestamp)}else this.ce(d);t.type===ia.FullSnapshot&&(this.lt.push([this.G,t.timestamp]),this.lt.length>6&&(this.lt=this.lt.slice(-6)));var g=null!==(e=null!==(i=null==v?void 0:v.currentSessionId)&&void 0!==i?i:null==p?void 0:p.nextSessionId)&&void 0!==e?e:this.G,w=null!==(n=null!==(s=null==v?void 0:v.currentWindowId)&&void 0!==s?s:null==p?void 0:p.nextWindowId)&&void 0!==n?n:this.St;if(!0!==this.st||function(t){return Ih(t)||Mh(t)||xh(t)}(d)){if(Ih(d)){var y=d.data.payload;if(y){var b=y.lastActivityTimestamp,S=y.threshold;d.timestamp=b+S}}var k=null===(o=this._instance.config.session_recording.compress_events)||void 0===o||o?function(t){try{if(t.type===ia.FullSnapshot)return r({},t,{data:kh(t.data),cv:"2024-10"});if(t.type===ia.IncrementalSnapshot&&t.data.source===na.Mutation)return r({},t,{cv:"2024-10",data:r({},t.data,{texts:kh(t.data.texts),attributes:kh(t.data.attributes),removes:kh(t.data.removes),adds:kh(t.data.adds)})});if(t.type===ia.IncrementalSnapshot&&t.data.source===na.StyleSheetRule)return r({},t,{cv:"2024-10",data:r({},t.data,{adds:t.data.adds?kh(t.data.adds):void 0,removes:t.data.removes?kh(t.data.removes):void 0})})}catch(t){gh.error("could not compress event - will use uncompressed event",t)}return t}(d):d,C={$snapshot_bytes:xa(k),$snapshot_data:k,$session_id:g,$window_id:w};d.type===ia.FullSnapshot&&null!=(a=bh())&&null!=a.wasMaxDepthReached&&a.wasMaxDepthReached()&&(this.ht=!0),this.status!==sa?this.fe(C):this.Bt()}}}}}get status(){return this.dt({receivedFlags:!0,isRecordingEnabled:!0,isSampled:this.Z,rrwebError:this.ot,urlTriggerMatching:this.jt,eventTriggerMatching:this.Pt,linkedFlagMatching:this.Dt,sessionId:this.sessionId})}log(t,e){var r;void 0===e&&(e="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.Dt.linkedFlagSeen=!0,this.Jt(),this.ie("linked_flag_overridden")}overrideSampling(){var t;null==(t=this._instance.persistence)||t.register({[Co]:this.sessionId}),this.Jt(),this.ie("sampling_overridden")}overrideTrigger(t){this.re(t)}he(){this.de&&(clearTimeout(this.de),this.de=void 0)}At(){this.he();var t=this.Ot();if(this.status===ha||this.status===ua||this.status===sa||t)return this.de=setTimeout((()=>{this.At()}),2e3),this._t;this._t.data.length>0&&Rh(this._t).forEach((t=>{var e;null==(e=this.Ct)||e.trackSize(t.size),this.ve({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId,$lib:uo.LIB_NAME,$lib_version:uo.LIB_VERSION})}));return this.Bt()}fe(t){var e,r=2+((null==(e=this._t)?void 0:e.data.length)||0),i=t.$session_id;!this.st&&(this._t.size+t.$snapshot_bytes+r>943718.4||this._t.sessionId!==i)&&(this._t=this.At(),this._t.sessionId=i,this._t.windowId=t.$window_id),this._t.size+=t.$snapshot_bytes,this._t.data.push(t.$snapshot_data),this._t.sizes.push(t.$snapshot_bytes),this.de||this.st||(this.de=setTimeout((()=>{this.At()}),2e3))}ve(t){this._instance.capture("$snapshot",t,{_url:this._instance.requestRouter.endpointFor("api",this.tt),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get Tt(){var t,e,r=null==(t=this._t)?void 0:t.data[(null==(e=this._t)?void 0:e.data.length)-1],{sessionStartTimestamp:i}=this.V.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}le(){if(!this._t||0===this._t.data.length)return this.Bt();for(var t=-1,e=this._t.data.length-1;e>=0;e--)if(this._t.data[e].type===ia.Meta){t=e;break}return t>=0?(this._t.data=this._t.data.slice(t),this._t.sizes=this._t.sizes.slice(t),this._t.size=this._t.sizes.reduce(((t,e)=>t+e),0),this._t):this.Bt()}Bt(){return this._t={size:0,data:[],sizes:[],sessionId:this.G,windowId:this.St},this._t}ie(t,e){this._instance.register_for_session({$session_recording_start_reason:t}),gh.info(t.replace("_"," "),e),"session_id_changed"!==t&&this.kt("$recording_started",r({reason:t},e))}pe(t){var e;return 3===t.type&&-1!==wh.indexOf(null==(e=t.data)?void 0:e.source)}ce(t){var e=this.pe(t);e||this.st||t.timestamp-this.rt>this.Y&&(this.st=!0,clearInterval(this.Qt),this.kt("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.rt,threshold:this.Y,bufferLength:this._t.data.length,bufferSize:this._t.size}),this.At());var r=!1;if(e&&(this.rt=t.timestamp,this.st)){var i="unknown"===this.st;this.st=!1,i||(this.kt("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)}if(!this.st){var{windowId:n,sessionId:s}=this.V.checkAndGetSessionAndWindowId(!e,t.timestamp),o=this.G!==s,a=this.St!==n;this.St=n,this.G=s,o||a?(this.stop(),this.start("session_id_changed")):r&&this.Kt()}}It(){var t,e,r,i;null==(t=this._instance)||null==(t=t.persistence)||t.unregister(xo),null==(e=this._instance)||null==(e=e.persistence)||e.unregister(Mo),null==(r=this._instance)||null==(r=r.persistence)||r.unregister(Co),null==(i=this._instance)||null==(i=i.persistence)||i.unregister(Io)}Mt(t){var e,r=this.G!==t,i=this.J;if(io(i)){var n=this.Z,s=r||!no(n),o=s?lh(t,i):n;s&&(o?this.ie(oa):gh.warn("Sample rate ("+i+") has determined that this sessionId ("+t+") will not be sent to the server."),this.kt("samplingDecisionMade",{sampleRate:i,isSampled:o})),null==(e=this._instance.persistence)||e.register({[Co]:!!o&&t})}else{var a;null==(a=this._instance.persistence)||a.unregister(Co)}}se(){0!==this.Pt.L.length&&ro(this.ft)&&(this.ft=this._instance.on("eventCaptured",(t=>{try{this.Pt.checkEventTriggerConditions(t.event,((t,e)=>this.re(t,e)),this.sessionId)}catch(t){gh.error("Could not activate event trigger",t)}})))}get sdkDebugProperties(){var t,{sessionStartTimestamp:e}=this.V.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this._t.data.length,$sdk_debug_replay_internal_buffer_size:this._t.size,$sdk_debug_current_session_duration:this.Tt,$sdk_debug_session_start:e,$sdk_debug_replay_flushed_size:null==(t=this.Ct)?void 0:t.currentTrackedSize,$sdk_debug_replay_full_snapshots:this.lt,$snapshot_max_depth_exceeded:this.ht,$sdk_debug_replay_rrweb_error:this.ot}}oe(){var t;if(!this.et){var e,i,n,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,h]of Object.entries(o||{}))a in s&&("maskInputOptions"===a?s.maskInputOptions=r({password:!0},h):s[a]=h);if(this.Wt&&this.Wt.enabled&&(s.recordCanvas=!0,s.sampling={canvas:this.Wt.fps},s.dataURLOptions={type:"image/webp",quality:this.Wt.quality}),this.Ut)s.maskAllInputs=null===(e=this.Ut.maskAllInputs)||void 0===e||e,s.maskTextSelector=null!==(i=this.Ut.maskTextSelector)&&void 0!==i?i:void 0,s.blockSelector=null!==(n=this.Ut.blockSelector)&&void 0!==n?n:void 0;var u=Sh();if(u){this.ue=null!==(t=this.ue)&&void 0!==t?t:new uh(u,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(t,e)=>{var r="Too many mutations on node '"+t+"'. Rate limiting. This could be due to SVG animations or something similar";gh.info(r,{node:e}),this.log(mh+" "+r,"warn")}});var l=this.qt();if(this.et=u(r({emit:t=>{this.onRRwebEmit(t)},plugins:l},s)),!this.et)return this.ot=!0,void gh.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.ot=!1,this.rt=Date.now(),this.st=no(this.st)?this.st:"unknown",this.tryAddCustomEvent("$remote_config_received",this.X),this.kt("$session_options",{sessionRecordingOptions:s,activePlugins:l.map((t=>null==t?void 0:t.name))}),this.kt("$posthog_config",{config:this._instance.config})}else gh.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(t,e){return this.kt(t,e)}}qs.__PosthogExtensions__=qs.__PosthogExtensions__||{},qs.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:t=>({name:"rrweb/console@1",observer:js,options:t}),getRecordNetworkPlugin:t=>({name:"rrweb/network@1",observer:ra,options:t})},qs.__PosthogExtensions__.rrweb={record:Ss,version:"v2",wasMaxDepthReached:function(){return lt},resetMaxDepthState:function(){lt=!1,ut=!1}},qs.__PosthogExtensions__.initSessionRecording=t=>new _h(t)}(); //# sourceMappingURL=posthog-recorder.js.map